Diff
Modified: trunk/LayoutTests/ChangeLog (210556 => 210557)
--- trunk/LayoutTests/ChangeLog 2017-01-10 20:12:18 UTC (rev 210556)
+++ trunk/LayoutTests/ChangeLog 2017-01-10 20:42:25 UTC (rev 210557)
@@ -1,3 +1,18 @@
+2017-01-10 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r210537.
+ https://bugs.webkit.org/show_bug.cgi?id=166903
+
+ This change introduced JSC test failures (Requested by
+ ryanhaddad on #webkit).
+
+ Reverted changeset:
+
+ "Implement JSSourceCode to propagate SourceCode in module
+ pipeline"
+ https://bugs.webkit.org/show_bug.cgi?id=166861
+ http://trac.webkit.org/changeset/210537
+
2017-01-10 Jer Noble <[email protected]>
Add support for MediaKeys.generateRequest().
Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/module-eval-blocked-expected.txt (210556 => 210557)
--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/module-eval-blocked-expected.txt 2017-01-10 20:12:18 UTC (rev 210556)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/module-eval-blocked-expected.txt 2017-01-10 20:42:25 UTC (rev 210557)
@@ -1,37 +1,37 @@
-CONSOLE MESSAGE: line 16: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
+CONSOLE MESSAGE: line 1: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
-CONSOLE MESSAGE: line 17: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
+CONSOLE MESSAGE: line 1: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
-CONSOLE MESSAGE: line 34: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
+CONSOLE MESSAGE: line 1: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
-CONSOLE MESSAGE: line 35: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
+CONSOLE MESSAGE: line 1: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
-CONSOLE MESSAGE: line 36: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
+CONSOLE MESSAGE: line 1: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
-CONSOLE MESSAGE: line 37: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
+CONSOLE MESSAGE: line 1: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
-CONSOLE MESSAGE: line 38: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
+CONSOLE MESSAGE: line 1: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
-CONSOLE MESSAGE: line 39: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
+CONSOLE MESSAGE: line 1: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
-CONSOLE MESSAGE: line 40: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
+CONSOLE MESSAGE: line 1: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
-CONSOLE MESSAGE: line 41: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
+CONSOLE MESSAGE: line 1: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
-CONSOLE MESSAGE: line 42: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
+CONSOLE MESSAGE: line 1: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
-CONSOLE MESSAGE: line 43: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
+CONSOLE MESSAGE: line 1: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
-CONSOLE MESSAGE: line 44: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
+CONSOLE MESSAGE: line 1: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
-CONSOLE MESSAGE: line 45: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
+CONSOLE MESSAGE: line 1: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
-CONSOLE MESSAGE: line 46: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
+CONSOLE MESSAGE: line 1: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
-CONSOLE MESSAGE: line 47: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
+CONSOLE MESSAGE: line 1: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
-CONSOLE MESSAGE: line 48: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
+CONSOLE MESSAGE: line 1: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
-CONSOLE MESSAGE: line 49: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
+CONSOLE MESSAGE: line 1: EvalError: Refused to evaluate a string as _javascript_ because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'unsafe-inline'".
Modified: trunk/Source/_javascript_Core/CMakeLists.txt (210556 => 210557)
--- trunk/Source/_javascript_Core/CMakeLists.txt 2017-01-10 20:12:18 UTC (rev 210556)
+++ trunk/Source/_javascript_Core/CMakeLists.txt 2017-01-10 20:42:25 UTC (rev 210557)
@@ -788,7 +788,6 @@
runtime/JSSegmentedVariableObject.cpp
runtime/JSSet.cpp
runtime/JSSetIterator.cpp
- runtime/JSSourceCode.cpp
runtime/JSString.cpp
runtime/JSStringIterator.cpp
runtime/JSStringJoiner.cpp
Modified: trunk/Source/_javascript_Core/ChangeLog (210556 => 210557)
--- trunk/Source/_javascript_Core/ChangeLog 2017-01-10 20:12:18 UTC (rev 210556)
+++ trunk/Source/_javascript_Core/ChangeLog 2017-01-10 20:42:25 UTC (rev 210557)
@@ -1,5 +1,20 @@
2017-01-10 Commit Queue <[email protected]>
+ Unreviewed, rolling out r210537.
+ https://bugs.webkit.org/show_bug.cgi?id=166903
+
+ This change introduced JSC test failures (Requested by
+ ryanhaddad on #webkit).
+
+ Reverted changeset:
+
+ "Implement JSSourceCode to propagate SourceCode in module
+ pipeline"
+ https://bugs.webkit.org/show_bug.cgi?id=166861
+ http://trac.webkit.org/changeset/210537
+
+2017-01-10 Commit Queue <[email protected]>
+
Unreviewed, rolling out r210540.
https://bugs.webkit.org/show_bug.cgi?id=166896
Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (210556 => 210557)
--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2017-01-10 20:12:18 UTC (rev 210556)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2017-01-10 20:42:25 UTC (rev 210557)
@@ -2372,8 +2372,6 @@
FED94F2F171E3E2300BE77A4 /* Watchdog.h in Headers */ = {isa = PBXBuildFile; fileRef = FED94F2C171E3E2300BE77A4 /* Watchdog.h */; settings = {ATTRIBUTES = (Private, ); }; };
FEF040511AAE662D00BD28B0 /* CompareAndSwapTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FEF040501AAE662D00BD28B0 /* CompareAndSwapTest.cpp */; };
FEFD6FC61D5E7992008F2F0B /* JSStringInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = FEFD6FC51D5E7970008F2F0B /* JSStringInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
- FA3AB211C8494524AB390267 /* JSSourceCode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F73926918DC64330AFCDF0D7 /* JSSourceCode.cpp */; };
- BDFCB2BBE90F41349E1B0BED /* JSSourceCode.h in Headers */ = {isa = PBXBuildFile; fileRef = 3032175DF1AD47D8998B34E1 /* JSSourceCode.h */; settings = {ATTRIBUTES = (Private, ); }; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -4902,8 +4900,6 @@
FEF040501AAE662D00BD28B0 /* CompareAndSwapTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CompareAndSwapTest.cpp; path = API/tests/CompareAndSwapTest.cpp; sourceTree = "<group>"; };
FEF040521AAEC4ED00BD28B0 /* CompareAndSwapTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CompareAndSwapTest.h; path = API/tests/CompareAndSwapTest.h; sourceTree = "<group>"; };
FEFD6FC51D5E7970008F2F0B /* JSStringInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSStringInlines.h; sourceTree = "<group>"; };
- F73926918DC64330AFCDF0D7 /* JSSourceCode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSSourceCode.cpp; path = JSSourceCode.cpp; sourceTree = "<group>"; };
- 3032175DF1AD47D8998B34E1 /* JSSourceCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSSourceCode.h; path = JSSourceCode.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -6744,8 +6740,6 @@
A7DCB77912E3D90500911940 /* WriteBarrier.h */,
C2B6D75218A33793004A9301 /* WriteBarrierInlines.h */,
425BA1337E4344E1B269A671 /* SourceOrigin.h */,
- F73926918DC64330AFCDF0D7 /* JSSourceCode.cpp */,
- 3032175DF1AD47D8998B34E1 /* JSSourceCode.h */,
);
path = runtime;
sourceTree = "<group>";
@@ -9120,7 +9114,6 @@
86704B8A12DBA33700A9FE7B /* YarrPattern.h in Headers */,
86704B4312DB8A8100A9FE7B /* YarrSyntaxChecker.h in Headers */,
2D342F36F7244096804ADB24 /* SourceOrigin.h in Headers */,
- BDFCB2BBE90F41349E1B0BED /* JSSourceCode.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -10509,7 +10502,6 @@
86704B8612DBA33700A9FE7B /* YarrJIT.cpp in Sources */,
86704B8912DBA33700A9FE7B /* YarrPattern.cpp in Sources */,
86704B4212DB8A8100A9FE7B /* YarrSyntaxChecker.cpp in Sources */,
- FA3AB211C8494524AB390267 /* JSSourceCode.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Modified: trunk/Source/_javascript_Core/builtins/ModuleLoaderPrototype.js (210556 => 210557)
--- trunk/Source/_javascript_Core/builtins/ModuleLoaderPrototype.js 2017-01-10 20:12:18 UTC (rev 210556)
+++ trunk/Source/_javascript_Core/builtins/ModuleLoaderPrototype.js 2017-01-10 20:42:25 UTC (rev 210557)
@@ -127,7 +127,7 @@
@fulfillPromise(promise, value);
}
-function fulfillFetch(entry, source)
+function fulfillFetch(entry, payload)
{
// https://whatwg.github.io/loader/#fulfill-fetch
@@ -135,7 +135,7 @@
if (!entry.fetch)
entry.fetch = @newPromiseCapability(@InternalPromise).@promise;
- this.forceFulfillPromise(entry.fetch, source);
+ this.forceFulfillPromise(entry.fetch, payload);
@setStateToMax(entry, @ModuleInstantiate);
}
@@ -220,9 +220,9 @@
// Take the key and fetch the resource actually.
// For example, _javascript_Core shell can provide the hook fetching the resource
// from the local file system.
- var fetchPromise = this.fetch(key, initiator).then((source) => {
+ var fetchPromise = this.fetch(key, initiator).then((payload) => {
@setStateToMax(entry, @ModuleInstantiate);
- return source;
+ return payload;
});
entry.fetch = fetchPromise;
return fetchPromise;
Modified: trunk/Source/_javascript_Core/jsc.cpp (210556 => 210557)
--- trunk/Source/_javascript_Core/jsc.cpp 2017-01-10 20:12:18 UTC (rev 210556)
+++ trunk/Source/_javascript_Core/jsc.cpp 2017-01-10 20:42:25 UTC (rev 210557)
@@ -53,7 +53,6 @@
#include "JSNativeStdFunction.h"
#include "JSONObject.h"
#include "JSProxy.h"
-#include "JSSourceCode.h"
#include "JSString.h"
#include "JSTypedArrays.h"
#include "JSWebAssemblyCallee.h"
@@ -1577,7 +1576,7 @@
if (!fetchModuleFromLocalFileSystem(moduleKey, utf8))
return deferred->reject(exec, createError(exec, makeString("Could not open file '", moduleKey, "'.")));
- return deferred->resolve(exec, JSSourceCode::create(exec->vm(), makeSource(stringFromUTF(utf8), SourceOrigin { moduleKey })));
+ return deferred->resolve(exec, jsString(exec, stringFromUTF(utf8)));
}
Modified: trunk/Source/_javascript_Core/llint/LLIntData.cpp (210556 => 210557)
--- trunk/Source/_javascript_Core/llint/LLIntData.cpp 2017-01-10 20:12:18 UTC (rev 210556)
+++ trunk/Source/_javascript_Core/llint/LLIntData.cpp 2017-01-10 20:42:25 UTC (rev 210557)
@@ -156,21 +156,21 @@
STATIC_ASSERT(StringType == 6);
STATIC_ASSERT(SymbolType == 7);
- STATIC_ASSERT(ObjectType == 22);
- STATIC_ASSERT(FinalObjectType == 23);
- STATIC_ASSERT(JSFunctionType == 25);
- STATIC_ASSERT(ArrayType == 33);
- STATIC_ASSERT(DerivedArrayType == 34);
- STATIC_ASSERT(ProxyObjectType == 52);
- STATIC_ASSERT(Int8ArrayType == 35);
- STATIC_ASSERT(Int16ArrayType == 36);
- STATIC_ASSERT(Int32ArrayType == 37);
- STATIC_ASSERT(Uint8ArrayType == 38);
- STATIC_ASSERT(Uint8ClampedArrayType == 39);
- STATIC_ASSERT(Uint16ArrayType == 40);
- STATIC_ASSERT(Uint32ArrayType == 41);
- STATIC_ASSERT(Float32ArrayType == 42);
- STATIC_ASSERT(Float64ArrayType == 43);
+ STATIC_ASSERT(ObjectType == 21);
+ STATIC_ASSERT(FinalObjectType == 22);
+ STATIC_ASSERT(JSFunctionType == 24);
+ STATIC_ASSERT(ArrayType == 32);
+ STATIC_ASSERT(DerivedArrayType == 33);
+ STATIC_ASSERT(ProxyObjectType == 51);
+ STATIC_ASSERT(Int8ArrayType == 34);
+ STATIC_ASSERT(Int16ArrayType == 35);
+ STATIC_ASSERT(Int32ArrayType == 36);
+ STATIC_ASSERT(Uint8ArrayType == 37);
+ STATIC_ASSERT(Uint8ClampedArrayType == 38);
+ STATIC_ASSERT(Uint16ArrayType == 39);
+ STATIC_ASSERT(Uint32ArrayType == 40);
+ STATIC_ASSERT(Float32ArrayType == 41);
+ STATIC_ASSERT(Float64ArrayType == 42);
STATIC_ASSERT(MasqueradesAsUndefined == 1);
STATIC_ASSERT(ImplementsDefaultHasInstance == 2);
STATIC_ASSERT(FirstConstantRegisterIndex == 0x40000000);
Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm (210556 => 210557)
--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm 2017-01-10 20:12:18 UTC (rev 210556)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm 2017-01-10 20:42:25 UTC (rev 210557)
@@ -345,24 +345,24 @@
# Type constants.
const StringType = 6
const SymbolType = 7
-const ObjectType = 22
-const FinalObjectType = 23
-const JSFunctionType = 25
-const ArrayType = 33
-const DerivedArrayType = 34
-const ProxyObjectType = 52
+const ObjectType = 21
+const FinalObjectType = 22
+const JSFunctionType = 24
+const ArrayType = 32
+const DerivedArrayType = 33
+const ProxyObjectType = 51
# The typed array types need to be numbered in a particular order because of the manually written
# switch statement in get_by_val and put_by_val.
-const Int8ArrayType = 35
-const Int16ArrayType = 36
-const Int32ArrayType = 37
-const Uint8ArrayType = 38
-const Uint8ClampedArrayType = 39
-const Uint16ArrayType = 40
-const Uint32ArrayType = 41
-const Float32ArrayType = 42
-const Float64ArrayType = 43
+const Int8ArrayType = 34
+const Int16ArrayType = 35
+const Int32ArrayType = 36
+const Uint8ArrayType = 37
+const Uint8ClampedArrayType = 38
+const Uint16ArrayType = 39
+const Uint32ArrayType = 40
+const Float32ArrayType = 41
+const Float64ArrayType = 42
const FirstArrayType = Int8ArrayType
const LastArrayType = Float64ArrayType
Modified: trunk/Source/_javascript_Core/runtime/Completion.cpp (210556 => 210557)
--- trunk/Source/_javascript_Core/runtime/Completion.cpp 2017-01-10 20:12:18 UTC (rev 210556)
+++ trunk/Source/_javascript_Core/runtime/Completion.cpp 2017-01-10 20:42:25 UTC (rev 210557)
@@ -193,7 +193,7 @@
JSGlobalObject* globalObject = exec->vmEntryGlobalObject();
// Insert the given source code to the ModuleLoader registry as the fetched registry entry.
- globalObject->moduleLoader()->provide(exec, key, JSModuleLoader::Status::Fetch, source);
+ globalObject->moduleLoader()->provide(exec, key, JSModuleLoader::Status::Fetch, source.view().toString());
RETURN_IF_EXCEPTION(scope, rejectPromise(exec, globalObject));
return loadAndEvaluateModule(lock, exec, globalObject, key, jsUndefined(), initiator);
@@ -232,7 +232,7 @@
// Insert the given source code to the ModuleLoader registry as the fetched registry entry.
// FIXME: Introduce JSSourceCode object to wrap around this source.
- globalObject->moduleLoader()->provide(exec, key, JSModuleLoader::Status::Fetch, source);
+ globalObject->moduleLoader()->provide(exec, key, JSModuleLoader::Status::Fetch, source.view().toString());
RETURN_IF_EXCEPTION(scope, rejectPromise(exec, globalObject));
return loadModule(lock, exec, globalObject, key, jsUndefined(), initiator);
Modified: trunk/Source/_javascript_Core/runtime/JSModuleLoader.cpp (210556 => 210557)
--- trunk/Source/_javascript_Core/runtime/JSModuleLoader.cpp 2017-01-10 20:12:18 UTC (rev 210556)
+++ trunk/Source/_javascript_Core/runtime/JSModuleLoader.cpp 2017-01-10 20:42:25 UTC (rev 210557)
@@ -38,7 +38,6 @@
#include "JSMap.h"
#include "JSModuleEnvironment.h"
#include "JSModuleRecord.h"
-#include "JSSourceCode.h"
#include "ModuleAnalyzer.h"
#include "ModuleLoaderPrototype.h"
#include "Nodes.h"
@@ -76,19 +75,17 @@
return exec->propertyNames().emptyIdentifier.impl();
}
-JSValue JSModuleLoader::provide(ExecState* exec, JSValue key, Status status, const SourceCode& sourceCode)
+JSValue JSModuleLoader::provide(ExecState* exec, JSValue key, Status status, const String& source)
{
- VM& vm = exec->vm();
JSObject* function = jsCast<JSObject*>(get(exec, exec->propertyNames().builtinNames().providePublicName()));
CallData callData;
CallType callType = JSC::getCallData(function, callData);
ASSERT(callType != CallType::None);
- SourceCode source { sourceCode };
MarkedArgumentBuffer arguments;
arguments.append(key);
arguments.append(jsNumber(status));
- arguments.append(JSSourceCode::create(vm, WTFMove(source)));
+ arguments.append(jsString(exec, source));
return call(exec, function, callType, callData, this, arguments);
}
Modified: trunk/Source/_javascript_Core/runtime/JSModuleLoader.h (210556 => 210557)
--- trunk/Source/_javascript_Core/runtime/JSModuleLoader.h 2017-01-10 20:12:18 UTC (rev 210556)
+++ trunk/Source/_javascript_Core/runtime/JSModuleLoader.h 2017-01-10 20:42:25 UTC (rev 210557)
@@ -32,7 +32,6 @@
class JSInternalPromise;
class JSModuleNamespaceObject;
-class SourceCode;
class JSModuleLoader : public JSNonFinalObject {
private:
@@ -63,7 +62,7 @@
}
// APIs to control the module loader.
- JSValue provide(ExecState*, JSValue key, Status, const SourceCode&);
+ JSValue provide(ExecState*, JSValue key, Status, const String&);
JSInternalPromise* loadAndEvaluateModule(ExecState*, JSValue moduleName, JSValue referrer, JSValue initiator);
JSInternalPromise* loadModule(ExecState*, JSValue moduleName, JSValue referrer, JSValue initiator);
JSValue linkAndEvaluateModule(ExecState*, JSValue moduleKey, JSValue initiator);
Deleted: trunk/Source/_javascript_Core/runtime/JSSourceCode.cpp (210556 => 210557)
--- trunk/Source/_javascript_Core/runtime/JSSourceCode.cpp 2017-01-10 20:12:18 UTC (rev 210556)
+++ trunk/Source/_javascript_Core/runtime/JSSourceCode.cpp 2017-01-10 20:42:25 UTC (rev 210557)
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2016 Yusuke Suzuki <[email protected]>
- *
- * 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. ``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
- * 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 "JSSourceCode.h"
-
-#include "JSCInlines.h"
-
-namespace JSC {
-
-const ClassInfo JSSourceCode::s_info = { "JSSourceCode", nullptr, nullptr, CREATE_METHOD_TABLE(JSSourceCode) };
-
-void JSSourceCode::destroy(JSCell* cell)
-{
- static_cast<JSSourceCode*>(cell)->~JSSourceCode();
-}
-
-} // namespace JSC
Deleted: trunk/Source/_javascript_Core/runtime/JSSourceCode.h (210556 => 210557)
--- trunk/Source/_javascript_Core/runtime/JSSourceCode.h 2017-01-10 20:12:18 UTC (rev 210556)
+++ trunk/Source/_javascript_Core/runtime/JSSourceCode.h 2017-01-10 20:42:25 UTC (rev 210557)
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2016 Yusuke Suzuki <[email protected]>
- *
- * 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. ``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
- * 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
-
-#include "JSGlobalObject.h"
-#include "JSObject.h"
-#include "SourceCode.h"
-
-namespace JSC {
-
-class JSSourceCode : public JSCell {
-public:
- using Base = JSCell;
-
- static const unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
- static const bool needsDestruction = true;
-
- DECLARE_EXPORT_INFO;
-
- static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
- {
- return Structure::create(vm, globalObject, prototype, TypeInfo(JSSourceCodeType, StructureFlags), info());
- }
-
- static JSSourceCode* create(VM& vm, Structure* structure, SourceCode&& sourceCode)
- {
- auto* result = new (NotNull, allocateCell<JSSourceCode>(vm.heap)) JSSourceCode(vm, structure, WTFMove(sourceCode));
- result->finishCreation(vm);
- return result;
- }
-
- static JSSourceCode* create(VM& vm, SourceCode&& sourceCode)
- {
- return create(vm, vm.sourceCodeStructure.get(), WTFMove(sourceCode));
- }
-
- const SourceCode& sourceCode() const
- {
- return m_sourceCode;
- }
-
- static void destroy(JSCell*);
-
-private:
- JSSourceCode(VM& vm, Structure* structure, SourceCode&& sourceCode)
- : Base(vm, structure)
- , m_sourceCode(WTFMove(sourceCode))
- {
- }
-
- SourceCode m_sourceCode;
-};
-
-} // namespace JSC
Modified: trunk/Source/_javascript_Core/runtime/JSType.h (210556 => 210557)
--- trunk/Source/_javascript_Core/runtime/JSType.h 2017-01-10 20:12:18 UTC (rev 210556)
+++ trunk/Source/_javascript_Core/runtime/JSType.h 2017-01-10 20:42:25 UTC (rev 210557)
@@ -50,7 +50,6 @@
UnlinkedFunctionCodeBlockType,
JSFixedArrayType,
- JSSourceCodeType,
// The ObjectType value must come before any JSType that is a subclass of JSObject.
ObjectType,
Modified: trunk/Source/_javascript_Core/runtime/ModuleLoaderPrototype.cpp (210556 => 210557)
--- trunk/Source/_javascript_Core/runtime/ModuleLoaderPrototype.cpp 2017-01-10 20:12:18 UTC (rev 210556)
+++ trunk/Source/_javascript_Core/runtime/ModuleLoaderPrototype.cpp 2017-01-10 20:42:25 UTC (rev 210557)
@@ -39,7 +39,6 @@
#include "JSModuleLoader.h"
#include "JSModuleNamespaceObject.h"
#include "JSModuleRecord.h"
-#include "JSSourceCode.h"
#include "ModuleAnalyzer.h"
#include "Nodes.h"
#include "Parser.h"
@@ -113,11 +112,11 @@
const Identifier moduleKey = exec->argument(0).toPropertyKey(exec);
RETURN_IF_EXCEPTION(scope, encodedJSValue());
- auto* jsSourceCode = jsDynamicCast<JSSourceCode*>(exec->argument(1));
- if (!jsSourceCode)
- return throwVMTypeError(exec, scope);
- SourceCode sourceCode = jsSourceCode->sourceCode();
+ String source = exec->argument(1).toWTFString(exec);
+ RETURN_IF_EXCEPTION(scope, encodedJSValue());
+ SourceCode sourceCode = makeSource(source, SourceOrigin { moduleKey.impl() }, moduleKey.impl(), TextPosition(), SourceProviderSourceType::Module);
+
CodeProfiling profile(sourceCode);
ParserError error;
Modified: trunk/Source/_javascript_Core/runtime/VM.cpp (210556 => 210557)
--- trunk/Source/_javascript_Core/runtime/VM.cpp 2017-01-10 20:12:18 UTC (rev 210556)
+++ trunk/Source/_javascript_Core/runtime/VM.cpp 2017-01-10 20:42:25 UTC (rev 210557)
@@ -71,7 +71,6 @@
#include "JSMap.h"
#include "JSPromiseDeferred.h"
#include "JSPropertyNameEnumerator.h"
-#include "JSSourceCode.h"
#include "JSTemplateRegistryKey.h"
#include "JSWebAssembly.h"
#include "JSWithScope.h"
@@ -239,7 +238,6 @@
symbolStructure.set(*this, Symbol::createStructure(*this, 0, jsNull()));
symbolTableStructure.set(*this, SymbolTable::createStructure(*this, 0, jsNull()));
fixedArrayStructure.set(*this, JSFixedArray::createStructure(*this, 0, jsNull()));
- sourceCodeStructure.set(*this, JSSourceCode::createStructure(*this, 0, jsNull()));
structureChainStructure.set(*this, StructureChain::createStructure(*this, 0, jsNull()));
sparseArrayValueMapStructure.set(*this, SparseArrayValueMap::createStructure(*this, 0, jsNull()));
templateRegistryKeyStructure.set(*this, JSTemplateRegistryKey::createStructure(*this, 0, jsNull()));
Modified: trunk/Source/_javascript_Core/runtime/VM.h (210556 => 210557)
--- trunk/Source/_javascript_Core/runtime/VM.h 2017-01-10 20:12:18 UTC (rev 210556)
+++ trunk/Source/_javascript_Core/runtime/VM.h 2017-01-10 20:42:25 UTC (rev 210557)
@@ -326,7 +326,6 @@
Strong<Structure> symbolStructure;
Strong<Structure> symbolTableStructure;
Strong<Structure> fixedArrayStructure;
- Strong<Structure> sourceCodeStructure;
Strong<Structure> structureChainStructure;
Strong<Structure> sparseArrayValueMapStructure;
Strong<Structure> templateRegistryKeyStructure;
Modified: trunk/Source/WebCore/ChangeLog (210556 => 210557)
--- trunk/Source/WebCore/ChangeLog 2017-01-10 20:12:18 UTC (rev 210556)
+++ trunk/Source/WebCore/ChangeLog 2017-01-10 20:42:25 UTC (rev 210557)
@@ -1,3 +1,18 @@
+2017-01-10 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r210537.
+ https://bugs.webkit.org/show_bug.cgi?id=166903
+
+ This change introduced JSC test failures (Requested by
+ ryanhaddad on #webkit).
+
+ Reverted changeset:
+
+ "Implement JSSourceCode to propagate SourceCode in module
+ pipeline"
+ https://bugs.webkit.org/show_bug.cgi?id=166861
+ http://trac.webkit.org/changeset/210537
+
2017-01-10 Chris Dumez <[email protected]>
REGRESSION(r189555): ImageDocument title no longer includes the size of the image
Deleted: trunk/Source/WebCore/ForwardingHeaders/runtime/JSSourceCode.h (210556 => 210557)
--- trunk/Source/WebCore/ForwardingHeaders/runtime/JSSourceCode.h 2017-01-10 20:12:18 UTC (rev 210556)
+++ trunk/Source/WebCore/ForwardingHeaders/runtime/JSSourceCode.h 2017-01-10 20:42:25 UTC (rev 210557)
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2016 Yusuke Suzuki <[email protected]>
- *
- * 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. ``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
- * 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
-#include <_javascript_Core/JSSourceCode.h>
Modified: trunk/Source/WebCore/bindings/js/JSDOMPromise.h (210556 => 210557)
--- trunk/Source/WebCore/bindings/js/JSDOMPromise.h 2017-01-10 20:12:18 UTC (rev 210556)
+++ trunk/Source/WebCore/bindings/js/JSDOMPromise.h 2017-01-10 20:42:25 UTC (rev 210557)
@@ -94,18 +94,6 @@
void reject(ExceptionCode, const String& = { });
void reject(const JSC::PrivateName&);
- template<typename Callback, typename Value>
- void resolveWithCallback(Callback callback, Value value)
- {
- if (isSuspended())
- return;
- ASSERT(m_deferred);
- ASSERT(m_globalObject);
- JSC::ExecState* exec = m_globalObject->globalExec();
- JSC::JSLockHolder locker(exec);
- resolve(*exec, callback(*exec, *m_globalObject.get(), std::forward<Value>(value)));
- }
-
JSC::JSValue promise() const;
bool isSuspended() { return !m_deferred || !canInvokeCallback(); } // The wrapper world has gone away or active DOM objects have been suspended.
Modified: trunk/Source/WebCore/bindings/js/ScriptModuleLoader.cpp (210556 => 210557)
--- trunk/Source/WebCore/bindings/js/ScriptModuleLoader.cpp 2017-01-10 20:12:18 UTC (rev 210556)
+++ trunk/Source/WebCore/bindings/js/ScriptModuleLoader.cpp 2017-01-10 20:42:25 UTC (rev 210557)
@@ -40,7 +40,6 @@
#include <runtime/JSInternalPromise.h>
#include <runtime/JSInternalPromiseDeferred.h>
#include <runtime/JSModuleRecord.h>
-#include <runtime/JSSourceCode.h>
#include <runtime/JSString.h>
#include <runtime/Symbol.h>
@@ -246,10 +245,8 @@
}
m_requestURLToResponseURLMap.add(cachedScript.url(), cachedScript.response().url());
- ScriptSourceCode scriptSourceCode(&cachedScript, JSC::SourceProviderSourceType::Module);
- promise->resolveWithCallback([] (JSC::ExecState& state, JSDOMGlobalObject&, JSC::SourceCode sourceCode) {
- return JSC::JSSourceCode::create(state.vm(), WTFMove(sourceCode));
- }, scriptSourceCode.jsSourceCode());
+ // FIXME: Let's wrap around ScriptSourceCode to propagate it directly through the module pipeline.
+ promise->resolve<IDLDOMString>(ScriptSourceCode(&cachedScript, JSC::SourceProviderSourceType::Module).source().toString());
}
}