Title: [191577] releases/WebKitGTK/webkit-2.10
Revision
191577
Author
[email protected]
Date
2015-10-26 02:25:18 -0700 (Mon, 26 Oct 2015)

Log Message

Merge r191530 - REGRESSION (r179357-r179359): WebContent Crash using AOL Mail @ com.apple._javascript_Core JSC::linkPolymorphicCall(JSC::ExecState*, JSC::CallLinkInfo&, JSC::CallVariant, JSC::RegisterPreservationMode) + 1584
https://bugs.webkit.org/show_bug.cgi?id=150513

Reviewed by Saam Barati.

Source/_javascript_Core:

Add check in linkPolymorphicCall() to make sure we have a CodeBlock for the newly added variant.
If not, we turn the call into a virtual call.

The bug was caused by a stack overflow when preparing the function for execution.  This properly
threw an exception, however linkPolymorphicCall() didn't check for this error case.

Added a new test function "failNextNewCodeBlock()" to test tools to simplify the testing.

* API/JSCTestRunnerUtils.cpp:
(JSC::failNextNewCodeBlock):
(JSC::numberOfDFGCompiles):
* API/JSCTestRunnerUtils.h:
* jit/Repatch.cpp:
(JSC::linkPolymorphicCall):
* jsc.cpp:
(GlobalObject::finishCreation):
(functionTransferArrayBuffer):
(functionFailNextNewCodeBlock):
(functionQuit):
* runtime/Executable.cpp:
(JSC::ScriptExecutable::prepareForExecutionImpl):
* runtime/TestRunnerUtils.cpp:
(JSC::optimizeNextInvocation):
(JSC::failNextNewCodeBlock):
(JSC::numberOfDFGCompiles):
* runtime/TestRunnerUtils.h:
* runtime/VM.h:
(JSC::VM::setFailNextNewCodeBlock):
(JSC::VM::getAndClearFailNextNewCodeBlock):
(JSC::VM::stackPointerAtVMEntry):

Tools:

Added a new test function, failNextNewCodeBlock() to simplify the writing of a regression test.

* DumpRenderTree/TestRunner.cpp:
(simulateWebNotificationClickCallback):
(failNextCodeBlock):
(numberOfDFGCompiles):
(TestRunner::staticFunctions):
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setBlockAllPlugins):
(WTR::TestRunner::failNextCodeBlock):
(WTR::TestRunner::numberOfDFGCompiles):
* WebKitTestRunner/InjectedBundle/TestRunner.h:

LayoutTests:

New regression test.

* js/regress-150513-expected.txt: Added.
* js/regress-150513.html: Added.
* js/script-tests/regress-150513.js: Added.
(test):
* resources/standalone-pre.js: Added failNextNewCodeBlock to testRunner object.

Modified Paths

Added Paths

Diff

Modified: releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog (191576 => 191577)


--- releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog	2015-10-26 08:57:40 UTC (rev 191576)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog	2015-10-26 09:25:18 UTC (rev 191577)
@@ -1,3 +1,18 @@
+2015-10-23  Michael Saboff  <[email protected]>
+
+        REGRESSION (r179357-r179359): WebContent Crash using AOL Mail @ com.apple._javascript_Core JSC::linkPolymorphicCall(JSC::ExecState*, JSC::CallLinkInfo&, JSC::CallVariant, JSC::RegisterPreservationMode) + 1584
+        https://bugs.webkit.org/show_bug.cgi?id=150513
+
+        Reviewed by Saam Barati.
+
+        New regression test.
+
+        * js/regress-150513-expected.txt: Added.
+        * js/regress-150513.html: Added.
+        * js/script-tests/regress-150513.js: Added.
+        (test):
+        * resources/standalone-pre.js: Added failNextNewCodeBlock to testRunner object.
+
 2015-10-23  Ryan Haddad  <[email protected]>
 
         Updating test expectation for animations/fill-forwards-end-state.html

Added: releases/WebKitGTK/webkit-2.10/LayoutTests/js/regress-150513-expected.txt (0 => 191577)


--- releases/WebKitGTK/webkit-2.10/LayoutTests/js/regress-150513-expected.txt	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/js/regress-150513-expected.txt	2015-10-26 09:25:18 UTC (rev 191577)
@@ -0,0 +1,10 @@
+Regression test for https://webkit.org/b/150513.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS Didn't crash when calling a virtual _javascript_ function that doesn't have a CodeBlock.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: releases/WebKitGTK/webkit-2.10/LayoutTests/js/regress-150513.html (0 => 191577)


--- releases/WebKitGTK/webkit-2.10/LayoutTests/js/regress-150513.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/js/regress-150513.html	2015-10-26 09:25:18 UTC (rev 191577)
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<script src=""
+<script src=""
+</body>
+</html>

Added: releases/WebKitGTK/webkit-2.10/LayoutTests/js/script-tests/regress-150513.js (0 => 191577)


--- releases/WebKitGTK/webkit-2.10/LayoutTests/js/script-tests/regress-150513.js	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/js/script-tests/regress-150513.js	2015-10-26 09:25:18 UTC (rev 191577)
@@ -0,0 +1,38 @@
+description("Regression test for https://webkit.org/b/150513.");
+
+// This test verifies that we can properly handle calling a virtual _javascript_
+// function that fails during CodeBlock generation.
+
+var functions = [];
+
+function init()
+{
+    functions.push(new Function("a", "return a"));
+    functions.push(new Function("a", "return a"));
+    functions.push(new Function("a", "return a"));
+}
+
+function test()
+{
+    for (var i = 0; i < 100000; i++) {
+        var f;
+        if (i % 1000 == 999) {
+            testRunner.failNextNewCodeBlock();
+            f = functions[2];
+        } else
+            f = functions[i % 2];
+
+        try {
+            var result = f(1);
+            if (result != 1)
+                testFailed("Wrong result, expected 1, got " + result);
+        } catch (e) {
+        }
+    }
+}
+
+init();
+
+test();
+
+testPassed("Didn't crash when calling a virtual _javascript_ function that doesn't have a CodeBlock.");

Modified: releases/WebKitGTK/webkit-2.10/LayoutTests/resources/standalone-pre.js (191576 => 191577)


--- releases/WebKitGTK/webkit-2.10/LayoutTests/resources/standalone-pre.js	2015-10-26 08:57:40 UTC (rev 191576)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/resources/standalone-pre.js	2015-10-26 09:25:18 UTC (rev 191577)
@@ -4,7 +4,8 @@
 
 self.testRunner = {
     neverInlineFunction: neverInlineFunction,
-    numberOfDFGCompiles: numberOfDFGCompiles
+    numberOfDFGCompiles: numberOfDFGCompiles,
+    failNextNewCodeBlock: failNextNewCodeBlock
 };
 
 var silentTestPass, didPassSomeTestsSilently, didFailSomeTests, successfullyParsed;

Modified: releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/API/JSCTestRunnerUtils.cpp (191576 => 191577)


--- releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/API/JSCTestRunnerUtils.cpp	2015-10-26 08:57:40 UTC (rev 191576)
+++ releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/API/JSCTestRunnerUtils.cpp	2015-10-26 09:25:18 UTC (rev 191577)
@@ -32,6 +32,14 @@
 
 namespace JSC {
 
+
+JSValueRef failNextNewCodeBlock(JSContextRef context)
+{
+    ExecState* exec= toJS(context);
+    JSLockHolder holder(exec);
+    return toRef(exec, failNextNewCodeBlock(exec));
+}
+
 JSValueRef numberOfDFGCompiles(JSContextRef context, JSValueRef theFunctionValueRef)
 {
     ExecState* exec= toJS(context);

Modified: releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/API/JSCTestRunnerUtils.h (191576 => 191577)


--- releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/API/JSCTestRunnerUtils.h	2015-10-26 08:57:40 UTC (rev 191576)
+++ releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/API/JSCTestRunnerUtils.h	2015-10-26 09:25:18 UTC (rev 191577)
@@ -31,6 +31,7 @@
 
 namespace JSC {
 
+JS_EXPORT_PRIVATE JSValueRef failNextNewCodeBlock(JSContextRef);
 JS_EXPORT_PRIVATE JSValueRef numberOfDFGCompiles(JSContextRef, JSValueRef theFunction);
 JS_EXPORT_PRIVATE JSValueRef setNeverInline(JSContextRef, JSValueRef theFunction);
 

Modified: releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/ChangeLog (191576 => 191577)


--- releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/ChangeLog	2015-10-26 08:57:40 UTC (rev 191576)
+++ releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/ChangeLog	2015-10-26 09:25:18 UTC (rev 191577)
@@ -1,3 +1,41 @@
+2015-10-23  Michael Saboff  <[email protected]>
+
+        REGRESSION (r179357-r179359): WebContent Crash using AOL Mail @ com.apple._javascript_Core JSC::linkPolymorphicCall(JSC::ExecState*, JSC::CallLinkInfo&, JSC::CallVariant, JSC::RegisterPreservationMode) + 1584
+        https://bugs.webkit.org/show_bug.cgi?id=150513
+
+        Reviewed by Saam Barati.
+
+        Add check in linkPolymorphicCall() to make sure we have a CodeBlock for the newly added variant.
+        If not, we turn the call into a virtual call.
+
+        The bug was caused by a stack overflow when preparing the function for execution.  This properly
+        threw an exception, however linkPolymorphicCall() didn't check for this error case.
+
+        Added a new test function "failNextNewCodeBlock()" to test tools to simplify the testing.
+
+        * API/JSCTestRunnerUtils.cpp:
+        (JSC::failNextNewCodeBlock):
+        (JSC::numberOfDFGCompiles):
+        * API/JSCTestRunnerUtils.h:
+        * jit/Repatch.cpp:
+        (JSC::linkPolymorphicCall):
+        * jsc.cpp:
+        (GlobalObject::finishCreation):
+        (functionTransferArrayBuffer):
+        (functionFailNextNewCodeBlock):
+        (functionQuit):
+        * runtime/Executable.cpp:
+        (JSC::ScriptExecutable::prepareForExecutionImpl):
+        * runtime/TestRunnerUtils.cpp:
+        (JSC::optimizeNextInvocation):
+        (JSC::failNextNewCodeBlock):
+        (JSC::numberOfDFGCompiles):
+        * runtime/TestRunnerUtils.h:
+        * runtime/VM.h:
+        (JSC::VM::setFailNextNewCodeBlock):
+        (JSC::VM::getAndClearFailNextNewCodeBlock):
+        (JSC::VM::stackPointerAtVMEntry):
+
 2015-10-13  Yusuke Suzuki  <[email protected]>
 
         REGRESSION: ASSERT (impl->isAtomic()) @ facebook.com

Modified: releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/jit/Repatch.cpp (191576 => 191577)


--- releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/jit/Repatch.cpp	2015-10-26 08:57:40 UTC (rev 191576)
+++ releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/jit/Repatch.cpp	2015-10-26 09:25:18 UTC (rev 191577)
@@ -1743,10 +1743,10 @@
             codeBlock = nullptr;
         else {
             codeBlock = jsCast<FunctionExecutable*>(variant.executable())->codeBlockForCall();
-            
-            // If we cannot handle a callee, assume that it's better for this whole thing to be a
-            // virtual call.
-            if (exec->argumentCountIncludingThis() < static_cast<size_t>(codeBlock->numParameters()) || callLinkInfo.callType() == CallLinkInfo::CallVarargs || callLinkInfo.callType() == CallLinkInfo::ConstructVarargs) {
+
+            // If we cannot handle a callee, either because we don't have a CodeBlock or because arity mismatch,
+            // assume that it's better for this whole thing to be a virtual call.
+            if (!codeBlock || exec->argumentCountIncludingThis() < static_cast<size_t>(codeBlock->numParameters()) || callLinkInfo.callType() == CallLinkInfo::CallVarargs || callLinkInfo.callType() == CallLinkInfo::ConstructVarargs) {
                 linkVirtualFor(exec, callLinkInfo);
                 return;
             }

Modified: releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/jsc.cpp (191576 => 191577)


--- releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/jsc.cpp	2015-10-26 08:57:40 UTC (rev 191576)
+++ releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/jsc.cpp	2015-10-26 09:25:18 UTC (rev 191577)
@@ -473,6 +473,7 @@
 static EncodedJSValue JSC_HOST_CALL functionNumberOfDFGCompiles(ExecState*);
 static EncodedJSValue JSC_HOST_CALL functionReoptimizationRetryCount(ExecState*);
 static EncodedJSValue JSC_HOST_CALL functionTransferArrayBuffer(ExecState*);
+static EncodedJSValue JSC_HOST_CALL functionFailNextNewCodeBlock(ExecState*);
 static NO_RETURN_WITH_VALUE EncodedJSValue JSC_HOST_CALL functionQuit(ExecState*);
 static EncodedJSValue JSC_HOST_CALL functionFalse1(ExecState*);
 static EncodedJSValue JSC_HOST_CALL functionFalse2(ExecState*);
@@ -622,6 +623,7 @@
         addFunction(vm, "optimizeNextInvocation", functionOptimizeNextInvocation, 1);
         addFunction(vm, "reoptimizationRetryCount", functionReoptimizationRetryCount, 1);
         addFunction(vm, "transferArrayBuffer", functionTransferArrayBuffer, 1);
+        addFunction(vm, "failNextNewCodeBlock", functionFailNextNewCodeBlock, 1);
 #if ENABLE(SAMPLING_FLAGS)
         addFunction(vm, "setSamplingFlags", functionSetSamplingFlags, 1);
         addFunction(vm, "clearSamplingFlags", functionClearSamplingFlags, 1);
@@ -1068,6 +1070,12 @@
     return JSValue::encode(jsUndefined());
 }
 
+EncodedJSValue JSC_HOST_CALL functionFailNextNewCodeBlock(ExecState* exec)
+{
+    exec->vm().setFailNextNewCodeBlock();
+    return JSValue::encode(jsUndefined());
+}
+
 EncodedJSValue JSC_HOST_CALL functionQuit(ExecState*)
 {
     jscExit(EXIT_SUCCESS);

Modified: releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/runtime/Executable.cpp (191576 => 191577)


--- releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/runtime/Executable.cpp	2015-10-26 08:57:40 UTC (rev 191576)
+++ releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/runtime/Executable.cpp	2015-10-26 09:25:18 UTC (rev 191577)
@@ -311,7 +311,10 @@
 {
     VM& vm = exec->vm();
     DeferGC deferGC(vm.heap);
-    
+
+    if (vm.getAndClearFailNextNewCodeBlock())
+        return createError(exec->callerFrame(), ASCIILiteral("Forced Failure"));
+
     JSObject* exception = 0;
     RefPtr<CodeBlock> codeBlock = newCodeBlockFor(kind, function, scope, exception);
     if (!codeBlock) {

Modified: releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/runtime/TestRunnerUtils.cpp (191576 => 191577)


--- releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/runtime/TestRunnerUtils.cpp	2015-10-26 08:57:40 UTC (rev 191576)
+++ releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/runtime/TestRunnerUtils.cpp	2015-10-26 09:25:18 UTC (rev 191577)
@@ -95,6 +95,13 @@
     return jsUndefined();
 }
 
+JSValue failNextNewCodeBlock(ExecState* exec)
+{
+    exec->vm().setFailNextNewCodeBlock();
+
+    return jsUndefined();
+}
+
 JSValue numberOfDFGCompiles(ExecState* exec)
 {
     if (exec->argumentCount() < 1)

Modified: releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/runtime/TestRunnerUtils.h (191576 => 191577)


--- releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/runtime/TestRunnerUtils.h	2015-10-26 08:57:40 UTC (rev 191576)
+++ releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/runtime/TestRunnerUtils.h	2015-10-26 09:25:18 UTC (rev 191577)
@@ -40,6 +40,7 @@
 JS_EXPORT_PRIVATE JSValue setNeverInline(JSValue function);
 JS_EXPORT_PRIVATE JSValue optimizeNextInvocation(JSValue function);
 
+JS_EXPORT_PRIVATE JSValue failNextNewCodeBlock(ExecState*);
 JS_EXPORT_PRIVATE JSValue numberOfDFGCompiles(ExecState*);
 JS_EXPORT_PRIVATE JSValue setNeverInline(ExecState*);
 JS_EXPORT_PRIVATE JSValue optimizeNextInvocation(ExecState*);

Modified: releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/runtime/VM.h (191576 => 191577)


--- releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/runtime/VM.h	2015-10-26 08:57:40 UTC (rev 191576)
+++ releases/WebKitGTK/webkit-2.10/Source/_javascript_Core/runtime/VM.h	2015-10-26 09:25:18 UTC (rev 191577)
@@ -408,6 +408,14 @@
     JS_EXPORT_PRIVATE JSValue throwException(ExecState*, JSValue);
     JS_EXPORT_PRIVATE JSObject* throwException(ExecState*, JSObject*);
 
+    void setFailNextNewCodeBlock() { m_failNextNewCodeBlock = true; }
+    bool getAndClearFailNextNewCodeBlock()
+    {
+        bool result = m_failNextNewCodeBlock;
+        m_failNextNewCodeBlock = false;
+        return result;
+    }
+    
     void* stackPointerAtVMEntry() const { return m_stackPointerAtVMEntry; }
     void setStackPointerAtVMEntry(void*);
 
@@ -601,6 +609,7 @@
     void* m_lastStackTop;
     Exception* m_exception { nullptr };
     Exception* m_lastException { nullptr };
+    bool m_failNextNewCodeBlock { false };
     bool m_inDefineOwnProperty;
     std::unique_ptr<CodeCache> m_codeCache;
     LegacyProfiler* m_enabledProfiler;

Modified: releases/WebKitGTK/webkit-2.10/Tools/ChangeLog (191576 => 191577)


--- releases/WebKitGTK/webkit-2.10/Tools/ChangeLog	2015-10-26 08:57:40 UTC (rev 191576)
+++ releases/WebKitGTK/webkit-2.10/Tools/ChangeLog	2015-10-26 09:25:18 UTC (rev 191577)
@@ -1,3 +1,24 @@
+2015-10-23  Michael Saboff  <[email protected]>
+
+        REGRESSION (r179357-r179359): WebContent Crash using AOL Mail @ com.apple._javascript_Core JSC::linkPolymorphicCall(JSC::ExecState*, JSC::CallLinkInfo&, JSC::CallVariant, JSC::RegisterPreservationMode) + 1584
+        https://bugs.webkit.org/show_bug.cgi?id=150513
+
+        Reviewed by Saam Barati.
+
+        Added a new test function, failNextNewCodeBlock() to simplify the writing of a regression test.
+
+        * DumpRenderTree/TestRunner.cpp:
+        (simulateWebNotificationClickCallback):
+        (failNextCodeBlock):
+        (numberOfDFGCompiles):
+        (TestRunner::staticFunctions):
+        * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+        (WTR::TestRunner::setBlockAllPlugins):
+        (WTR::TestRunner::failNextCodeBlock):
+        (WTR::TestRunner::numberOfDFGCompiles):
+        * WebKitTestRunner/InjectedBundle/TestRunner.h:
+
 2015-10-22  Ryosuke Niwa  <[email protected]>
 
         REGRESSION (r181972): Scroll position changes to top of youtube page when switching tabs

Modified: releases/WebKitGTK/webkit-2.10/Tools/DumpRenderTree/TestRunner.cpp (191576 => 191577)


--- releases/WebKitGTK/webkit-2.10/Tools/DumpRenderTree/TestRunner.cpp	2015-10-26 08:57:40 UTC (rev 191576)
+++ releases/WebKitGTK/webkit-2.10/Tools/DumpRenderTree/TestRunner.cpp	2015-10-26 09:25:18 UTC (rev 191577)
@@ -1926,11 +1926,16 @@
     return JSValueMakeUndefined(context);
 }
 
-static JSValueRef numberOfDFGCompiles(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef failNextNewCodeBlock(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
     
+    return JSC::failNextNewCodeBlock(context);
+}
+
+static JSValueRef numberOfDFGCompiles(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
     return JSC::numberOfDFGCompiles(context, arguments[0]);
 }
 
@@ -2141,6 +2146,7 @@
         { "denyWebNotificationPermission", denyWebNotificationPermissionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "removeAllWebNotificationPermissions", removeAllWebNotificationPermissionsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "simulateWebNotificationClick", simulateWebNotificationClickCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+        { "failNextNewCodeBlock", failNextNewCodeBlock, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "numberOfDFGCompiles", numberOfDFGCompiles, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "neverInlineFunction", neverInlineFunction, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { 0, 0, 0 }

Modified: releases/WebKitGTK/webkit-2.10/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl (191576 => 191577)


--- releases/WebKitGTK/webkit-2.10/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl	2015-10-26 08:57:40 UTC (rev 191576)
+++ releases/WebKitGTK/webkit-2.10/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl	2015-10-26 09:25:18 UTC (rev 191577)
@@ -200,6 +200,7 @@
     void setBlockAllPlugins(boolean shouldBlock);
     
     // Hooks to the JSC compiler.
+    object failNextNewCodeBlock();
     object numberOfDFGCompiles(object function);
     object neverInlineFunction(object function);
 };

Modified: releases/WebKitGTK/webkit-2.10/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (191576 => 191577)


--- releases/WebKitGTK/webkit-2.10/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp	2015-10-26 08:57:40 UTC (rev 191576)
+++ releases/WebKitGTK/webkit-2.10/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp	2015-10-26 09:25:18 UTC (rev 191577)
@@ -842,6 +842,13 @@
     WKBundlePagePostMessage(InjectedBundle::singleton().page()->page(), messageName.get(), messageBody.get());
 }
 
+JSValueRef TestRunner::failNextNewCodeBlock()
+{
+    WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::singleton().page()->page());
+    JSContextRef context = WKBundleFrameGetJavaScriptContext(mainFrame);
+    return JSC::failNextNewCodeBlock(context);
+}
+
 JSValueRef TestRunner::numberOfDFGCompiles(JSValueRef theFunction)
 {
     WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::singleton().page()->page());

Modified: releases/WebKitGTK/webkit-2.10/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (191576 => 191577)


--- releases/WebKitGTK/webkit-2.10/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h	2015-10-26 08:57:40 UTC (rev 191576)
+++ releases/WebKitGTK/webkit-2.10/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h	2015-10-26 09:25:18 UTC (rev 191577)
@@ -279,6 +279,7 @@
 
     bool secureEventInputIsEnabled() const;
     
+    JSValueRef failNextNewCodeBlock();
     JSValueRef numberOfDFGCompiles(JSValueRef theFunction);
     JSValueRef neverInlineFunction(JSValueRef theFunction);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to