Title: [202737] trunk/Source/_javascript_Core
Revision
202737
Author
[email protected]
Date
2016-07-01 09:38:11 -0700 (Fri, 01 Jul 2016)

Log Message

Update JSC_functionOverrides to handle the new SourceCode strings that have params.
https://bugs.webkit.org/show_bug.cgi?id=159321

Reviewed by Geoffrey Garen.

And add tests so that this won't fail silently and bit rot anymore.

* API/tests/FunctionOverridesTest.cpp: Added.
(testFunctionOverrides):
* API/tests/FunctionOverridesTest.h: Added.
* API/tests/testapi-function-overrides.js: Added.
* API/tests/testapi.c:
(main):
* _javascript_Core.xcodeproj/project.pbxproj:
* bytecode/UnlinkedFunctionExecutable.cpp:
(JSC::UnlinkedFunctionExecutable::link):
* shell/PlatformWin.cmake:
* tools/FunctionOverrides.cpp:
(JSC::FunctionOverrides::FunctionOverrides):
(JSC::FunctionOverrides::reinstallOverrides):
(JSC::initializeOverrideInfo):
(JSC::FunctionOverrides::initializeOverrideFor):
* tools/FunctionOverrides.h:
(JSC::FunctionOverrides::clear):

Modified Paths

Added Paths

Diff

Added: trunk/Source/_javascript_Core/API/tests/FunctionOverridesTest.cpp (0 => 202737)


--- trunk/Source/_javascript_Core/API/tests/FunctionOverridesTest.cpp	                        (rev 0)
+++ trunk/Source/_javascript_Core/API/tests/FunctionOverridesTest.cpp	2016-07-01 16:38:11 UTC (rev 202737)
@@ -0,0 +1,92 @@
+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "FunctionOverridesTest.h"
+
+#include "FunctionOverrides.h"
+#include "InitializeThreading.h"
+#include "JSContextRefPrivate.h"
+#include "_javascript_Core.h"
+#include "Options.h"
+#include <string>
+#include <wtf/text/StringBuilder.h>
+
+using JSC::Options;
+
+int testFunctionOverrides()
+{
+    bool failed = false;
+
+    JSC::initializeThreading();
+    Options::initialize(); // Ensure options is initialized first.
+
+    const char* oldFunctionOverrides = Options::functionOverrides();
+    
+    Options::functionOverrides() = "testapi-function-overrides.js";
+    JSC::FunctionOverrides::reinstallOverrides();
+
+    JSGlobalContextRef context = JSGlobalContextCreateInGroup(nullptr, nullptr);
+
+    JSObjectRef globalObject = JSContextGetGlobalObject(context);
+    ASSERT_UNUSED(globalObject, JSValueIsObject(context, globalObject));
+
+    const char* scriptString =
+        "var str = '';" "\n"
+        "function f1() { /* Original f1 */ }" "\n"
+        "str += f1 + '\\n';" "\n"
+        "var f2 = function() {" "\n"
+        "    // Original f2" "\n"
+        "}" "\n"
+        "str += f2 + '\\n';" "\n"
+        "str += (function() { /* Original f3 */ }) + '\\n';" "\n"
+        "var f4Source = '/* Original f4 */'" "\n"
+        "var f4 =  new Function(f4Source);" "\n"
+        "str += f4 + '\\n';" "\n"
+        "\n"
+        "var expectedStr =" "\n"
+        "'function f1() { /* Overridden f1 */ }\\n"
+        "function () { /* Overridden f2 */ }\\n"
+        "function () { /* Overridden f3 */ }\\n"
+        "function anonymous() { /* Overridden f4 */ }\\n';"
+        "var result = (str == expectedStr);" "\n"
+        "result";
+
+    JSStringRef script = JSStringCreateWithUTF8CString(scriptString);
+    JSValueRef exception = nullptr;
+    JSValueRef resultRef = JSEvaluateScript(context, script, nullptr, nullptr, 1, &exception);
+
+    if (!JSValueIsBoolean(context, resultRef) || !JSValueToBoolean(context, resultRef))
+        failed = true;
+
+    JSGlobalContextRelease(context);
+    
+    JSC::Options::functionOverrides() = oldFunctionOverrides;
+    JSC::FunctionOverrides::reinstallOverrides();
+
+    printf("%s: function override tests.\n", failed ? "FAIL" : "PASS");
+
+    return failed;
+}

Added: trunk/Source/_javascript_Core/API/tests/FunctionOverridesTest.h (0 => 202737)


--- trunk/Source/_javascript_Core/API/tests/FunctionOverridesTest.h	                        (rev 0)
+++ trunk/Source/_javascript_Core/API/tests/FunctionOverridesTest.h	2016-07-01 16:38:11 UTC (rev 202737)
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Returns 1 if failures were encountered.  Else, returns 0. */
+int testFunctionOverrides();
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif

Added: trunk/Source/_javascript_Core/API/tests/testapi-function-overrides.js (0 => 202737)


--- trunk/Source/_javascript_Core/API/tests/testapi-function-overrides.js	                        (rev 0)
+++ trunk/Source/_javascript_Core/API/tests/testapi-function-overrides.js	2016-07-01 16:38:11 UTC (rev 202737)
@@ -0,0 +1,16 @@
+// testapi function overrides for testing.
+override %%%{ /* Original f1 */ }%%%
+with %%%{ /* Overridden f1 */ }%%%
+
+override #$%{
+    // Original f2
+}#$%
+with $$${ /* Overridden f2 */ }$$$
+
+override %%%{ /* Original f3 */ }%%%
+with %%%{ /* Overridden f3 */ }%%%
+
+override %%%{
+/* Original f4 */
+}%%%
+with %%%{ /* Overridden f4 */ }%%%

Modified: trunk/Source/_javascript_Core/API/tests/testapi.c (202736 => 202737)


--- trunk/Source/_javascript_Core/API/tests/testapi.c	2016-07-01 15:40:39 UTC (rev 202736)
+++ trunk/Source/_javascript_Core/API/tests/testapi.c	2016-07-01 16:38:11 UTC (rev 202737)
@@ -42,6 +42,7 @@
 #include "CompareAndSwapTest.h"
 #include "CustomGlobalObjectClassTest.h"
 #include "ExecutionTimeLimitTest.h"
+#include "FunctionOverridesTest.h"
 #include "GlobalContextWithFinalizerTest.h"
 #include "PingPongStackOverflowTest.h"
 #include "TypedArrayCTest.h"
@@ -1885,6 +1886,7 @@
 
     failed = testTypedArrayCAPI() || failed;
     failed = testExecutionTimeLimit() || failed;
+    failed = testFunctionOverrides() || failed;
     failed = testGlobalContextWithFinalizer() || failed;
     failed = testPingPongStackOverflow() || failed;
 

Modified: trunk/Source/_javascript_Core/ChangeLog (202736 => 202737)


--- trunk/Source/_javascript_Core/ChangeLog	2016-07-01 15:40:39 UTC (rev 202736)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-07-01 16:38:11 UTC (rev 202737)
@@ -1,3 +1,30 @@
+2016-07-01  Mark Lam  <[email protected]>
+
+        Update JSC_functionOverrides to handle the new SourceCode strings that have params.
+        https://bugs.webkit.org/show_bug.cgi?id=159321
+
+        Reviewed by Geoffrey Garen.
+
+        And add tests so that this won't fail silently and bit rot anymore.
+
+        * API/tests/FunctionOverridesTest.cpp: Added.
+        (testFunctionOverrides):
+        * API/tests/FunctionOverridesTest.h: Added.
+        * API/tests/testapi-function-overrides.js: Added.
+        * API/tests/testapi.c:
+        (main):
+        * _javascript_Core.xcodeproj/project.pbxproj:
+        * bytecode/UnlinkedFunctionExecutable.cpp:
+        (JSC::UnlinkedFunctionExecutable::link):
+        * shell/PlatformWin.cmake:
+        * tools/FunctionOverrides.cpp:
+        (JSC::FunctionOverrides::FunctionOverrides):
+        (JSC::FunctionOverrides::reinstallOverrides):
+        (JSC::initializeOverrideInfo):
+        (JSC::FunctionOverrides::initializeOverrideFor):
+        * tools/FunctionOverrides.h:
+        (JSC::FunctionOverrides::clear):
+
 2016-07-01  Caio Lima  <[email protected]>
 
         ES6: Implement HasRestrictedGlobalProperty when checking for global lexical tier conflicts

Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (202736 => 202737)


--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2016-07-01 15:40:39 UTC (rev 202736)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2016-07-01 16:38:11 UTC (rev 202737)
@@ -2108,6 +2108,8 @@
 		FEB51F6C1A97B688001F921C /* Regress141809.mm in Sources */ = {isa = PBXBuildFile; fileRef = FEB51F6B1A97B688001F921C /* Regress141809.mm */; };
 		FEB58C14187B8B160098EF0B /* ErrorHandlingScope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FEB58C12187B8B160098EF0B /* ErrorHandlingScope.cpp */; };
 		FEB58C15187B8B160098EF0B /* ErrorHandlingScope.h in Headers */ = {isa = PBXBuildFile; fileRef = FEB58C13187B8B160098EF0B /* ErrorHandlingScope.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		FECB8B271D25BB85006F2463 /* FunctionOverridesTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FECB8B251D25BB6E006F2463 /* FunctionOverridesTest.cpp */; };
+		FECB8B2A1D25CB5A006F2463 /* testapi-function-overrides.js in Copy Support Script */ = {isa = PBXBuildFile; fileRef = FECB8B291D25CABB006F2463 /* testapi-function-overrides.js */; };
 		FED287B215EC9A5700DA8161 /* LLIntOpcode.h in Headers */ = {isa = PBXBuildFile; fileRef = FED287B115EC9A5700DA8161 /* LLIntOpcode.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		FED94F2E171E3E2300BE77A4 /* Watchdog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FED94F2B171E3E2300BE77A4 /* Watchdog.cpp */; };
 		FED94F2F171E3E2300BE77A4 /* Watchdog.h in Headers */ = {isa = PBXBuildFile; fileRef = FED94F2C171E3E2300BE77A4 /* Watchdog.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -2236,6 +2238,7 @@
 			dstPath = "";
 			dstSubfolderSpec = 16;
 			files = (
+				FECB8B2A1D25CB5A006F2463 /* testapi-function-overrides.js in Copy Support Script */,
 				5DBB151B131D0B310056AD36 /* testapi.js in Copy Support Script */,
 			);
 			name = "Copy Support Script";
@@ -4372,6 +4375,9 @@
 		FEB51F6B1A97B688001F921C /* Regress141809.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = Regress141809.mm; path = API/tests/Regress141809.mm; sourceTree = "<group>"; };
 		FEB58C12187B8B160098EF0B /* ErrorHandlingScope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ErrorHandlingScope.cpp; sourceTree = "<group>"; };
 		FEB58C13187B8B160098EF0B /* ErrorHandlingScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ErrorHandlingScope.h; sourceTree = "<group>"; };
+		FECB8B251D25BB6E006F2463 /* FunctionOverridesTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FunctionOverridesTest.cpp; path = API/tests/FunctionOverridesTest.cpp; sourceTree = "<group>"; };
+		FECB8B261D25BB6E006F2463 /* FunctionOverridesTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FunctionOverridesTest.h; path = API/tests/FunctionOverridesTest.h; sourceTree = "<group>"; };
+		FECB8B291D25CABB006F2463 /* testapi-function-overrides.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode._javascript_; name = "testapi-function-overrides.js"; path = "API/tests/testapi-function-overrides.js"; sourceTree = "<group>"; };
 		FED287B115EC9A5700DA8161 /* LLIntOpcode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLIntOpcode.h; path = llint/LLIntOpcode.h; sourceTree = "<group>"; };
 		FED94F2B171E3E2300BE77A4 /* Watchdog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Watchdog.cpp; sourceTree = "<group>"; };
 		FED94F2C171E3E2300BE77A4 /* Watchdog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Watchdog.h; sourceTree = "<group>"; };
@@ -4957,6 +4963,8 @@
 				C288B2DD18A54D3E007BE40B /* DateTests.mm */,
 				FE0D4A041AB8DD0A002F54BF /* ExecutionTimeLimitTest.cpp */,
 				FE0D4A051AB8DD0A002F54BF /* ExecutionTimeLimitTest.h */,
+				FECB8B251D25BB6E006F2463 /* FunctionOverridesTest.cpp */,
+				FECB8B261D25BB6E006F2463 /* FunctionOverridesTest.h */,
 				FE0D4A071ABA2437002F54BF /* GlobalContextWithFinalizerTest.cpp */,
 				FE0D4A081ABA2437002F54BF /* GlobalContextWithFinalizerTest.h */,
 				C2181FC018A948FB0025A235 /* JSExportTests.h */,
@@ -4970,6 +4978,7 @@
 				FEB51F6B1A97B688001F921C /* Regress141809.mm */,
 				14BD5A2D0A3E91F600BAF59C /* testapi.c */,
 				14D857740A4696C80032146C /* testapi.js */,
+				FECB8B291D25CABB006F2463 /* testapi-function-overrides.js */,
 				86D22219167EF9440024C804 /* testapi.mm */,
 				651122E5140469BA002B101D /* testRegExp.cpp */,
 			);
@@ -8624,6 +8633,7 @@
 			buildActionMask = 2147483647;
 			files = (
 				FEF040511AAE662D00BD28B0 /* CompareAndSwapTest.cpp in Sources */,
+				FECB8B271D25BB85006F2463 /* FunctionOverridesTest.cpp in Sources */,
 				C29ECB031804D0ED00D2CBB4 /* CurrentThisInsideBlockGetterTest.mm in Sources */,
 				C20328201981979D0088B499 /* CustomGlobalObjectClassTest.c in Sources */,
 				C288B2DE18A54D3E007BE40B /* DateTests.mm in Sources */,

Modified: trunk/Source/_javascript_Core/bytecode/UnlinkedFunctionExecutable.cpp (202736 => 202737)


--- trunk/Source/_javascript_Core/bytecode/UnlinkedFunctionExecutable.cpp	2016-07-01 15:40:39 UTC (rev 202736)
+++ trunk/Source/_javascript_Core/bytecode/UnlinkedFunctionExecutable.cpp	2016-07-01 16:38:11 UTC (rev 202737)
@@ -145,7 +145,7 @@
 
     if (UNLIKELY(Options::functionOverrides())) {
         hasFunctionOverride = FunctionOverrides::initializeOverrideFor(code, overrideInfo);
-        if (hasFunctionOverride) {
+        if (UNLIKELY(hasFunctionOverride)) {
             firstLine = overrideInfo.firstLine;
             lineCount = overrideInfo.lineCount;
             startColumn = overrideInfo.startColumn;

Modified: trunk/Source/_javascript_Core/shell/PlatformWin.cmake (202736 => 202737)


--- trunk/Source/_javascript_Core/shell/PlatformWin.cmake	2016-07-01 15:40:39 UTC (rev 202736)
+++ trunk/Source/_javascript_Core/shell/PlatformWin.cmake	2016-07-01 16:38:11 UTC (rev 202737)
@@ -29,6 +29,7 @@
     ../API/tests/CompareAndSwapTest.cpp
     ../API/tests/CustomGlobalObjectClassTest.c
     ../API/tests/ExecutionTimeLimitTest.cpp
+    ../API/tests/FunctionOverridesTest.cpp
     ../API/tests/GlobalContextWithFinalizerTest.cpp
     ../API/tests/PingPongStackOverflowTest.cpp
     ../API/tests/testapi.c
@@ -47,3 +48,8 @@
     DESTINATION
     ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
 )
+file(COPY
+    "${_javascript_CORE_DIR}/API/tests/testapi-function-overrides.js"
+    DESTINATION
+    ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
+)

Modified: trunk/Source/_javascript_Core/tools/FunctionOverrides.cpp (202736 => 202737)


--- trunk/Source/_javascript_Core/tools/FunctionOverrides.cpp	2016-07-01 15:40:39 UTC (rev 202736)
+++ trunk/Source/_javascript_Core/tools/FunctionOverrides.cpp	2016-07-01 16:38:11 UTC (rev 202737)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2016 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -104,11 +104,20 @@
     parseOverridesInFile(overridesFileName);
 }
 
+void FunctionOverrides::reinstallOverrides()
+{
+    FunctionOverrides& overrides = FunctionOverrides::overrides();
+    const char* overridesFileName = Options::functionOverrides();
+    overrides.clear();
+    overrides.parseOverridesInFile(overridesFileName);
+}
+
 static void initializeOverrideInfo(const SourceCode& origCode, const String& newBody, FunctionOverrides::OverrideInfo& info)
 {
     String origProviderStr = origCode.provider()->source().toString();
-    unsigned origBraceStart = origCode.startOffset();
-    unsigned origFunctionStart = origProviderStr.reverseFind("function", origBraceStart);
+    unsigned origStart = origCode.startOffset();
+    unsigned origFunctionStart = origProviderStr.reverseFind("function", origStart);
+    unsigned origBraceStart = origProviderStr.find("{", origStart);
     unsigned headerLength = origBraceStart - origFunctionStart;
     String origHeader = origProviderStr.substring(origFunctionStart, headerLength);
 
@@ -127,7 +136,7 @@
     info.typeProfilingEndOffset = newProviderStr.length() - 1;
 
     info.sourceCode =
-        SourceCode(WTFMove(newProvider), info.typeProfilingStartOffset, info.typeProfilingEndOffset + 1, 1, 1);
+        SourceCode(WTFMove(newProvider), info.parametersStartOffset, info.typeProfilingEndOffset + 1, 1, 1);
 }
     
 bool FunctionOverrides::initializeOverrideFor(const SourceCode& origCode, FunctionOverrides::OverrideInfo& result)
@@ -135,7 +144,13 @@
     ASSERT(Options::functionOverrides());
     FunctionOverrides& overrides = FunctionOverrides::overrides();
 
-    auto it = overrides.m_entries.find(origCode.view().toString());
+    String sourceString = origCode.view().toString();
+    size_t sourceBodyStart = sourceString.find('{');
+    if (sourceBodyStart == notFound)
+        return false;
+    String sourceBodyString = sourceString.substring(sourceBodyStart);
+
+    auto it = overrides.m_entries.find(sourceBodyString);
     if (it == overrides.m_entries.end())
         return false;
 

Modified: trunk/Source/_javascript_Core/tools/FunctionOverrides.h (202736 => 202737)


--- trunk/Source/_javascript_Core/tools/FunctionOverrides.h	2016-07-01 15:40:39 UTC (rev 202736)
+++ trunk/Source/_javascript_Core/tools/FunctionOverrides.h	2016-07-01 16:38:11 UTC (rev 202737)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2016 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -53,8 +53,11 @@
 
     static bool initializeOverrideFor(const SourceCode& origCode, OverrideInfo& result);
 
+    JS_EXPORT_PRIVATE static void reinstallOverrides();
+
 private:
     void parseOverridesInFile(const char* fileName);
+    void clear() { m_entries.clear(); }
 
     HashMap<String, String> m_entries;
 };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to