platform/mac-wk2/plugins/destroy-during-async-npp-new.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=133692

* platform/mac-wk2/TestExpectations: Skipped the test.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix crashes on some plug-in tests.
https://bugs.webkit.org/show_bug.cgi?id=133691
<rdar://problem/17255836>

Reviewed by Anders Carlsson.

* PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::initialize):
Cannot use TemporaryChange here, because the object may go away before stack unwinds.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Assertion failure at JSC::Structure::checkOffsetConsistency() const + 234.
<https://webkit.org/b/133356>

Reviewed by Mark Hahnenberg.


Source/JavaScriptCore: 
The root cause of this issue is that a nonPropertyTransition can transition
a pinned dictionary structure to an unpinned dictionary structure.  The new
structure will get a copy of the property table from the original structure.
However, when a GC occurs, the property table in the new structure will be
cleared because it is unpinned.  This leads to complications in subsequent
derivative structures when flattening occurs, which eventually leads to the
assertion failure in this bug.

The fix is to ensure that the new dictionary structure generated by the
nonPropertyTransition will have a copy of its predecessor's property table
and is pinned.

* runtime/Structure.cpp:
(JSC::Structure::nonPropertyTransition):

LayoutTests: 
* TestExpectations:
- Undoing expectation for js/primitive-property-access-edge-cases.html now
  that the bug is fixed.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add process entitlements
https://bugs.webkit.org/show_bug.cgi?id=133693

Reviewed by Alexey Proskuryakov.

Add entitlements description for Database process, and
ensure that we reference the correct seatbelt profiles.

* Configurations/DatabaseService.Development.xcconfig:
* Configurations/DatabaseService.xcconfig:
* Configurations/Databases-iOS.entitlements:
* Configurations/Network-iOS.entitlements:
* Configurations/WebContent-iOS.entitlements:
* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169759 268f45cc-cd09-0410-ab3c-d52691b4dbfc
fast/dom/beforeload/remove-frame-in-beforeload-listener.html and related tests are flaky
https://bugs.webkit.org/show_bug.cgi?id=133685

* platform/wk2/TestExpectations: Skipped more affected tests.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r169733): compositing/iframes/become-composited-nested-iframes.html fails on WebKit1 bots
https://bugs.webkit.org/show_bug.cgi?id=133694

* platform/mac/TestExpectations: Marked the test as failing

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Skip some more flaky tests.
https://bugs.webkit.org/show_bug.cgi?id=133696
<rdar://problem/17257097>

* platform/wk2/TestExpectations:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't call Connection::terminateSoon if the connection is null
https://bugs.webkit.org/show_bug.cgi?id=133695
<rdar://problem/17069024>

Reviewed by Tim Horton.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::removeWebPage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] http/tests/navigation/new-window-redirect-history.html crashes
https://bugs.webkit.org/show_bug.cgi?id=127683

* platform/wk2/TestExpectations: Changed expectation from Crash to Skip, because
it crashes every time, and generating more crash logs only makes other tests more
flaky without providing useful information.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add -[WKWebView evaluateJavaScript:completionHandler:]
https://bugs.webkit.org/show_bug.cgi?id=133689
<rdar://problem/17152685>

Reviewed by Geoffrey Garen.

Source/WebCore:
* English.lproj/Localizable.strings:
Add new localizable strings.

Source/WebKit2:
* Shared/API/c/WKErrorRef.h:
Remove WKErrorCode typedef from here.

* UIProcess/API/C/WKPageLoaderClient.h:
Use uint32_t instead of WKErrorCode.

* UIProcess/API/Cocoa/WKError.h:
(NS_ENUM):
Add a WKErrorDomain and a WKErrorCode enum.

* UIProcess/API/Cocoa/WKError.mm:
(localizedDescriptionForErrorCode):
Helper that returns the localized description given an error code.

(createNSError):
Helper that creates an NSError with the correct localized description given an error code.

* UIProcess/API/Cocoa/WKErrorInternal.h:
Add helpers.

* UIProcess/API/Cocoa/WKWebView.h:
Add evaluateJavaScript:completionHandler: method.

* UIProcess/API/Cocoa/WKWebView.mm:
(callbackErrorCode):
Helper that returns a WKErrorCode from a WebKit::CallbackBase::Error enum.

(-[WKWebView evaluateJavaScript:completionHandler:]):
Run the JavaScript code and handle all the error cases.

(-[WKWebView _runJavaScriptInMainFrame:]):
Reimplement this using the API method.

* WebKit2.xcodeproj/project.pbxproj:
Add new files.

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