Diff
Modified: trunk/LayoutTests/ChangeLog (166247 => 166248)
--- trunk/LayoutTests/ChangeLog 2014-03-25 20:25:52 UTC (rev 166247)
+++ trunk/LayoutTests/ChangeLog 2014-03-25 20:40:34 UTC (rev 166248)
@@ -1,3 +1,16 @@
+2014-03-25 Michael Saboff <msab...@apple.com>
+
+ Unreviewed, rolling out r166126.
+
+ Rollout r166126 in prepartion to roll out prerequisite r166070
+
+ Reverted changeset:
+
+ "toThis() on a JSWorkerGlobalScope should return a JSProxy and
+ not undefined"
+ https://bugs.webkit.org/show_bug.cgi?id=130554
+ http://trac.webkit.org/changeset/166126
+
2014-03-25 Dirk Schulze <k...@webkit.org>
Implement ImageData constructors and WebWorkers exposure
Deleted: trunk/LayoutTests/fast/workers/resources/worker-strict.js (166247 => 166248)
--- trunk/LayoutTests/fast/workers/resources/worker-strict.js 2014-03-25 20:25:52 UTC (rev 166247)
+++ trunk/LayoutTests/fast/workers/resources/worker-strict.js 2014-03-25 20:40:34 UTC (rev 166248)
@@ -1,11 +0,0 @@
-"use strict";
-
-postMessage("SUCCESS: postMessage() called directly");
-
-(function () {
- this.done = function() { return "SUCCESS: called function via attribute on WorkerGlobalScope"; };
-
- this.postMessage(this.done());
-
- this.postMessage("DONE");
-}).call(this);
Deleted: trunk/LayoutTests/fast/workers/worker-strict-expected.txt (166247 => 166248)
--- trunk/LayoutTests/fast/workers/worker-strict-expected.txt 2014-03-25 20:25:52 UTC (rev 166247)
+++ trunk/LayoutTests/fast/workers/worker-strict-expected.txt 2014-03-25 20:40:34 UTC (rev 166248)
@@ -1,6 +0,0 @@
-Test calling functions in strict mode script from WorkerContext. Should print SUCCESS lines, followed by DONE.
-
-SUCCESS: postMessage() called directly
-SUCCESS: called function via attribute on WorkerGlobalScope
-DONE
-
Deleted: trunk/LayoutTests/fast/workers/worker-strict.html (166247 => 166248)
--- trunk/LayoutTests/fast/workers/worker-strict.html 2014-03-25 20:25:52 UTC (rev 166247)
+++ trunk/LayoutTests/fast/workers/worker-strict.html 2014-03-25 20:40:34 UTC (rev 166248)
@@ -1,25 +0,0 @@
-<body>
-<p>Test calling functions in strict mode script from WorkerContext. Should print SUCCESS lines, followed by DONE.</p>
-<div id=result></div>
-<script>
-
-if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
-}
-
-function log(message)
-{
- document.getElementById("result").innerHTML += message + "<br>";
-}
-
-var worker = new Worker("resources/worker-strict.js");
-worker._onmessage_ = function(event) {
- log(event.data);
- if (event.data == "DONE") {
- if (window.testRunner)
- testRunner.notifyDone();
- }
-};
-</script>
-</body>
Modified: trunk/Source/_javascript_Core/API/JSContextRef.cpp (166247 => 166248)
--- trunk/Source/_javascript_Core/API/JSContextRef.cpp 2014-03-25 20:25:52 UTC (rev 166247)
+++ trunk/Source/_javascript_Core/API/JSContextRef.cpp 2014-03-25 20:40:34 UTC (rev 166248)
@@ -129,6 +129,7 @@
if (!globalObjectClass) {
JSGlobalObject* globalObject = JSGlobalObject::create(*vm, JSGlobalObject::createStructure(*vm, jsNull()));
+ globalObject->setGlobalThis(*vm, JSProxy::create(*vm, JSProxy::createStructure(*vm, globalObject, globalObject->prototype()), globalObject));
return JSGlobalContextRetain(toGlobalRef(globalObject->globalExec()));
}
Modified: trunk/Source/_javascript_Core/API/tests/testapi.c (166247 => 166248)
--- trunk/Source/_javascript_Core/API/tests/testapi.c 2014-03-25 20:25:52 UTC (rev 166247)
+++ trunk/Source/_javascript_Core/API/tests/testapi.c 2014-03-25 20:40:34 UTC (rev 166248)
@@ -891,8 +891,10 @@
// Ensure that an execution context is passed in
ASSERT(context);
+ // Ensure that the global object is set to the object that we were passed
JSObjectRef globalObject = JSContextGetGlobalObject(context);
ASSERT(globalObject);
+ ASSERT(object == globalObject);
// Ensure that the standard global properties have been set on the global object
JSStringRef array = JSStringCreateWithUTF8CString("Array");
Modified: trunk/Source/_javascript_Core/ChangeLog (166247 => 166248)
--- trunk/Source/_javascript_Core/ChangeLog 2014-03-25 20:25:52 UTC (rev 166247)
+++ trunk/Source/_javascript_Core/ChangeLog 2014-03-25 20:40:34 UTC (rev 166248)
@@ -1,3 +1,16 @@
+2014-03-25 Michael Saboff <msab...@apple.com>
+
+ Unreviewed, rolling out r166126.
+
+ Rollout r166126 in prepartion to roll out prerequisite r166070
+
+ Reverted changeset:
+
+ "toThis() on a JSWorkerGlobalScope should return a JSProxy and
+ not undefined"
+ https://bugs.webkit.org/show_bug.cgi?id=130554
+ http://trac.webkit.org/changeset/166126
+
2014-03-25 Oliver Hunt <oli...@apple.com>
AST incorrectly conflates readable and writable locations
Modified: trunk/Source/_javascript_Core/jsc.cpp (166247 => 166248)
--- trunk/Source/_javascript_Core/jsc.cpp 2014-03-25 20:25:52 UTC (rev 166247)
+++ trunk/Source/_javascript_Core/jsc.cpp 2014-03-25 20:40:34 UTC (rev 166248)
@@ -351,6 +351,7 @@
GlobalObject* object = new (NotNull, allocateCell<GlobalObject>(vm.heap)) GlobalObject(vm, structure);
object->finishCreation(vm, arguments);
vm.heap.addFinalizer(object, destroy);
+ object->setGlobalThis(vm, JSProxy::create(vm, JSProxy::createStructure(vm, object, object->prototype()), object));
return object;
}
Modified: trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp (166247 => 166248)
--- trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp 2014-03-25 20:25:52 UTC (rev 166247)
+++ trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp 2014-03-25 20:40:34 UTC (rev 166248)
@@ -197,10 +197,11 @@
m_globalThis.set(vm, this, globalThis);
}
-void JSGlobalObject::init()
+void JSGlobalObject::init(JSObject* thisValue)
{
ASSERT(vm().currentThreadIsHoldingAPILock());
+ setGlobalThis(vm(), thisValue);
JSGlobalObject::globalExec()->init(0, 0, this, CallFrame::noCaller(), 0, 0);
m_debugger = 0;
Modified: trunk/Source/_javascript_Core/runtime/JSGlobalObject.h (166247 => 166248)
--- trunk/Source/_javascript_Core/runtime/JSGlobalObject.h 2014-03-25 20:25:52 UTC (rev 166247)
+++ trunk/Source/_javascript_Core/runtime/JSGlobalObject.h 2014-03-25 20:40:34 UTC (rev 166248)
@@ -27,7 +27,6 @@
#include "JSArray.h"
#include "JSArrayBufferPrototype.h"
#include "JSClassRef.h"
-#include "JSProxy.h"
#include "JSSegmentedVariableObject.h"
#include "JSWeakObjectMapRefInternal.h"
#include "NumberPrototype.h"
@@ -297,8 +296,7 @@
Base::finishCreation(vm);
structure()->setGlobalObject(vm, this);
m_experimentsEnabled = m_globalObjectMethodTable->_javascript_ExperimentsEnabled(this);
- init();
- setGlobalThis(vm, JSProxy::create(vm, JSProxy::createStructure(vm, this, prototype()), this));
+ init(this);
}
void finishCreation(VM& vm, JSObject* thisValue)
@@ -306,8 +304,7 @@
Base::finishCreation(vm);
structure()->setGlobalObject(vm, this);
m_experimentsEnabled = m_globalObjectMethodTable->_javascript_ExperimentsEnabled(this);
- init();
- setGlobalThis(vm, thisValue);
+ init(thisValue);
}
struct NewGlobalVar {
@@ -540,6 +537,7 @@
VM& vm() const { return m_vm; }
JSObject* globalThis() const;
+ JS_EXPORT_PRIVATE void setGlobalThis(VM&, JSObject* globalThis);
static Structure* createStructure(VM& vm, JSValue prototype)
{
@@ -592,11 +590,9 @@
private:
friend class LLIntOffsetsExtractor;
-
- JS_EXPORT_PRIVATE void setGlobalThis(VM&, JSObject* globalThis);
-
+
// FIXME: Fold reset into init.
- JS_EXPORT_PRIVATE void init();
+ JS_EXPORT_PRIVATE void init(JSObject* thisValue);
void reset(JSValue prototype);
void createThrowTypeError(VM&);
Modified: trunk/Source/WebCore/ChangeLog (166247 => 166248)
--- trunk/Source/WebCore/ChangeLog 2014-03-25 20:25:52 UTC (rev 166247)
+++ trunk/Source/WebCore/ChangeLog 2014-03-25 20:40:34 UTC (rev 166248)
@@ -1,3 +1,16 @@
+2014-03-25 Michael Saboff <msab...@apple.com>
+
+ Unreviewed, rolling out r166126.
+
+ Rollout r166126 in prepartion to roll out prerequisite r166070
+
+ Reverted changeset:
+
+ "toThis() on a JSWorkerGlobalScope should return a JSProxy and
+ not undefined"
+ https://bugs.webkit.org/show_bug.cgi?id=130554
+ http://trac.webkit.org/changeset/166126
+
2014-03-25 Jer Noble <jer.no...@apple.com>
[iOS] Playing video does not disable display sleep.
Modified: trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp (166247 => 166248)
--- trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp 2014-03-25 20:25:52 UTC (rev 166247)
+++ trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp 2014-03-25 20:40:34 UTC (rev 166248)
@@ -130,8 +130,6 @@
const ClassInfo* classInfo = asObject(value)->classInfo();
if (classInfo == JSDedicatedWorkerGlobalScope::info())
return jsCast<JSDedicatedWorkerGlobalScope*>(asObject(value));
- if (classInfo == JSProxy::info())
- return jsDynamicCast<JSDedicatedWorkerGlobalScope*>(jsCast<JSProxy*>(asObject(value))->target());
return 0;
}
@@ -143,8 +141,6 @@
const ClassInfo* classInfo = asObject(value)->classInfo();
if (classInfo == JSSharedWorkerGlobalScope::info())
return jsCast<JSSharedWorkerGlobalScope*>(asObject(value));
- if (classInfo == JSProxy::info())
- return jsDynamicCast<JSSharedWorkerGlobalScope*>(jsCast<JSProxy*>(asObject(value))->target());
return 0;
}
#endif
Modified: trunk/Source/WebCore/bindings/js/WorkerScriptController.cpp (166247 => 166248)
--- trunk/Source/WebCore/bindings/js/WorkerScriptController.cpp 2014-03-25 20:25:52 UTC (rev 166247)
+++ trunk/Source/WebCore/bindings/js/WorkerScriptController.cpp 2014-03-25 20:40:34 UTC (rev 166248)
@@ -132,7 +132,7 @@
JSLockHolder lock(exec);
JSValue evaluationException;
- JSC::evaluate(exec, sourceCode.jsSourceCode(), m_workerGlobalScopeWrapper->globalThis(), &evaluationException);
+ JSC::evaluate(exec, sourceCode.jsSourceCode(), m_workerGlobalScopeWrapper.get(), &evaluationException);
if ((evaluationException && isTerminatedExecutionException(evaluationException)) || m_workerGlobalScopeWrapper->vm().watchdog.didFire()) {
forbidExecution();
Modified: trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.idl (166247 => 166248)
--- trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.idl 2014-03-25 20:25:52 UTC (rev 166247)
+++ trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.idl 2014-03-25 20:40:34 UTC (rev 166248)
@@ -30,7 +30,6 @@
[
GlobalContext=DedicatedWorkerGlobalScope,
- CustomProxyToJSObject,
JSGenerateToNativeObject,
JSNoStaticTables,
] interface DedicatedWorkerGlobalScope : WorkerGlobalScope {
Modified: trunk/Source/WebCore/workers/SharedWorkerGlobalScope.idl (166247 => 166248)
--- trunk/Source/WebCore/workers/SharedWorkerGlobalScope.idl 2014-03-25 20:25:52 UTC (rev 166247)
+++ trunk/Source/WebCore/workers/SharedWorkerGlobalScope.idl 2014-03-25 20:40:34 UTC (rev 166248)
@@ -30,7 +30,6 @@
[
GlobalContext=SharedWorkerGlobalScope,
- CustomProxyToJSObject,
Conditional=SHARED_WORKERS,
JSGenerateToNativeObject,
JSNoStaticTables,
Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.idl (166247 => 166248)
--- trunk/Source/WebCore/workers/WorkerGlobalScope.idl 2014-03-25 20:25:52 UTC (rev 166247)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.idl 2014-03-25 20:40:34 UTC (rev 166248)
@@ -26,7 +26,6 @@
[
GlobalContext=WorkerGlobalScope,
- CustomProxyToJSObject,
JSCustomMarkFunction,
JSCustomGetOwnPropertySlotAndDescriptor,
EventTarget,