[V8] Add ASSERT() to guarantee that we don't store NULL pointers to V8 internal fields
https://bugs.webkit.org/show_bug.cgi?id=101054

Reviewed by Adam Barth.

I'm investigating a Chromium crash bug:
http://code.google.com/p/chromium/issues/detail?id=155942

I've not yet identified the root cause (because I can't reproduce
the crash), but it looks like we are storing NULL pointers to
V8 internal fields. Just in case, we can add an ASSERT() to
guarantee that NULL pointers are never stored. (Also I'm hoping
that this ASSERT() will give me more debug information.)

No tests. No change in behavior.

* bindings/v8/V8DOMWrapper.h:
(WebCore::V8DOMWrapper::setDOMWrapper):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Adding window.external to our port
https://bugs.webkit.org/show_bug.cgi?id=100868

Patch by Otto Derek Cheung <otcheung@rim.com> on 2012-11-02
Reviewed by Rob Buis.
PR 158809

Patch up an error where we were dereferencing a null pointer.

* WebCoreSupport/ExternalExtension.cpp:
(addSearchProviderMethod):
(IsSearchProviderInstalledMethod):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move m_element checks out of canShareStyle into locateSharedStyle
https://bugs.webkit.org/show_bug.cgi?id=101070

Reviewed by Darin Adler.

Can shareStyleWithElement is called for each sibling as we look for a
shareElement. locateSharedStyle is called once for the element we're
trying to find a style for. Checks that only depend on the latter
element should, thus be in locateSharedStyle.

No new tests. There should be no change in behavior, except possibly
a performance improvement in some cases.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithElement):
(WebCore::StyleResolver::locateSharedStyle):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix build warning [-Wswitch]
https://bugs.webkit.org/show_bug.cgi?id=101029

Patch by Jinwoo Song <jinwoo7.song@samsung.com> on 2012-11-02
Reviewed by Alexey Proskuryakov.

Fix build warning message: enumeration value ‘Viewport’ not handled in switch [-Wswitch]
in Source/WebCore/css/StyleSheetContents.cpp.
Add case statement for 'Viewport' with the CSS_DEVICE_ADAPTATION macro.

* css/StyleSheetContents.cpp:
(WebCore::childRulesHaveFailedOrCanceledSubresources):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Remove dependency on SoupPasswordManager
https://bugs.webkit.org/show_bug.cgi?id=100775

Patch by Martin Robinson <mrobinson@igalia.com> on 2012-11-02
Reviewed by Carlos Garcia Campos.

.:

Add a libsecret dependency to the build. This is necessary so that we can remove
a dependency on SoupPasswordManager.

* configure.ac: Look for libsecret using the pkg-config configuration macro.

Source/WebCore:

Remember passwords using libsecret instead of SoupPasswordManager. We accomplish this using
a new class, CredentialBackingStore. CredentialBackingStore will soon be the thing that backs
CredentialStoreGtk. The name is based on the name of a similar class from the BlackBerry port.

No new tests. This does not change behavior.

* GNUmakefile.am: Add libsecret flags to the build and the new directory to the include list.
* GNUmakefile.list.am: Add new files to the source list.
* platform/gtk/GRefPtrGtk.cpp: Add support for SecretValue to GRefPtrGtk.
* platform/gtk/GtkAuthenticationDialog.cpp: Replace interaction with SoupPasswordManger with
interaction with the CredentialBackingStore. Remove all conditional SoupPasswordManager guards.
* platform/gtk/GtkAuthenticationDialog.h: Ditto.
* platform/network/gtk/CredentialBackingStore.cpp: Added.
* platform/network/gtk/CredentialBackingStore.h: Added.

Source/WebKit/gtk:

Add a libsecret dependency to the build. This is necessary so that we can remove
a dependency on SoupPasswordManager.

* GNUmakefile.am: Use libsecret libs during WebKit1 library compilation.

Source/WebKit2:

Add a libsecret dependency to the build. This is necessary so that we can remove
a dependency on SoupPasswordManager.

* GNUmakefile.am: Add libsecret CFLAGS to the WebKit2 build.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133317 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][EFL] Crash when calling WebOpenPanelResultListenerProxy::cancel() after PageClient is destroyed
https://bugs.webkit.org/show_bug.cgi?id=100977

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-11-02
Reviewed by Alexey Proskuryakov.

Call WebPageProxy::close() in EwkViewImpl's destructor to avoid crashes
if other objects keep a reference to the WebPageProxy and try to use
it after the view (and therefore the PageClient) is destroyed.

* UIProcess/API/efl/EwkViewImpl.cpp:
(EwkViewImpl::~EwkViewImpl):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133318 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r132913.
http://trac.webkit.org/changeset/132913
https://bugs.webkit.org/show_bug.cgi?id=91850

Caused performance regressions.
See https://bugs.webkit.org/show_bug.cgi?id=100872 for details.


* bindings/v8/V8PerIsolateData.cpp:
(WebCore::V8PerIsolateData::visitExternalStrings):
* bindings/v8/V8StringResource.cpp:
(StringTraits):
(WebCore::v8StringToWebCoreString):
* bindings/v8/V8ValueCache.cpp:
(WebCore::makeExternalString):
(WebCore::WebCoreStringResource::visitStrings):
* bindings/v8/V8ValueCache.h:
(WebCore::WebCoreStringResource::WebCoreStringResource):
(WebCore::WebCoreStringResource::~WebCoreStringResource):
(WebCore::WebCoreStringResource::data):
(WebCoreStringResource):
(WebCore::WebCoreStringResource::length):
(WebCore::WebCoreStringResource::atomicString):
(WebCore::WebCoreStringResource::toStringResource):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133319 268f45cc-cd09-0410-ab3c-d52691b4dbfc