Diff
Modified: trunk/LayoutTests/ChangeLog (166414 => 166415)
--- trunk/LayoutTests/ChangeLog 2014-03-28 17:58:57 UTC (rev 166414)
+++ trunk/LayoutTests/ChangeLog 2014-03-28 18:10:39 UTC (rev 166415)
@@ -1,3 +1,14 @@
+2014-03-28 Michael Saboff <msab...@apple.com>
+
+ Unreviewed, rolling r166248 back in.
+
+ Turns out r166070 didn't cause a 2% performance loss in page load times
+
+ Reverted changeset:
+
+ Unreviewed, rolling out r166126.
+ Rollout r166126 in prepartion to roll out prerequisite r166070
+
2014-03-28 Krzysztof Czech <k.cz...@samsung.com>
[EFL][GTK] Remove expectations after r166194
Added: trunk/LayoutTests/fast/workers/resources/worker-strict.js (0 => 166415)
--- trunk/LayoutTests/fast/workers/resources/worker-strict.js (rev 0)
+++ trunk/LayoutTests/fast/workers/resources/worker-strict.js 2014-03-28 18:10:39 UTC (rev 166415)
@@ -0,0 +1,11 @@
+"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);
Added: trunk/LayoutTests/fast/workers/worker-strict-expected.txt (0 => 166415)
--- trunk/LayoutTests/fast/workers/worker-strict-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/workers/worker-strict-expected.txt 2014-03-28 18:10:39 UTC (rev 166415)
@@ -0,0 +1,6 @@
+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
+
Added: trunk/LayoutTests/fast/workers/worker-strict.html (0 => 166415)
--- trunk/LayoutTests/fast/workers/worker-strict.html (rev 0)
+++ trunk/LayoutTests/fast/workers/worker-strict.html 2014-03-28 18:10:39 UTC (rev 166415)
@@ -0,0 +1,25 @@
+<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 (166414 => 166415)
--- trunk/Source/_javascript_Core/API/JSContextRef.cpp 2014-03-28 17:58:57 UTC (rev 166414)
+++ trunk/Source/_javascript_Core/API/JSContextRef.cpp 2014-03-28 18:10:39 UTC (rev 166415)
@@ -129,7 +129,6 @@
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 (166414 => 166415)
--- trunk/Source/_javascript_Core/API/tests/testapi.c 2014-03-28 17:58:57 UTC (rev 166414)
+++ trunk/Source/_javascript_Core/API/tests/testapi.c 2014-03-28 18:10:39 UTC (rev 166415)
@@ -891,10 +891,8 @@
// 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 (166414 => 166415)
--- trunk/Source/_javascript_Core/ChangeLog 2014-03-28 17:58:57 UTC (rev 166414)
+++ trunk/Source/_javascript_Core/ChangeLog 2014-03-28 18:10:39 UTC (rev 166415)
@@ -1,3 +1,14 @@
+2014-03-28 Michael Saboff <msab...@apple.com>
+
+ Unreviewed, rolling r166248 back in.
+
+ Turns out r166070 didn't cause a 2% performance loss in page load times
+
+ Reverted changeset:
+
+ Unreviewed, rolling out r166126.
+ Rollout r166126 in prepartion to roll out prerequisite r166070
+
2014-03-27 Commit Queue <commit-qu...@webkit.org>
Unreviewed, rolling out r166376.
Modified: trunk/Source/_javascript_Core/jsc.cpp (166414 => 166415)
--- trunk/Source/_javascript_Core/jsc.cpp 2014-03-28 17:58:57 UTC (rev 166414)
+++ trunk/Source/_javascript_Core/jsc.cpp 2014-03-28 18:10:39 UTC (rev 166415)
@@ -351,7 +351,6 @@
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 (166414 => 166415)
--- trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp 2014-03-28 17:58:57 UTC (rev 166414)
+++ trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp 2014-03-28 18:10:39 UTC (rev 166415)
@@ -197,11 +197,10 @@
m_globalThis.set(vm, this, globalThis);
}
-void JSGlobalObject::init(JSObject* thisValue)
+void JSGlobalObject::init()
{
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 (166414 => 166415)
--- trunk/Source/_javascript_Core/runtime/JSGlobalObject.h 2014-03-28 17:58:57 UTC (rev 166414)
+++ trunk/Source/_javascript_Core/runtime/JSGlobalObject.h 2014-03-28 18:10:39 UTC (rev 166415)
@@ -27,6 +27,7 @@
#include "JSArray.h"
#include "JSArrayBufferPrototype.h"
#include "JSClassRef.h"
+#include "JSProxy.h"
#include "JSSegmentedVariableObject.h"
#include "JSWeakObjectMapRefInternal.h"
#include "NumberPrototype.h"
@@ -296,7 +297,8 @@
Base::finishCreation(vm);
structure()->setGlobalObject(vm, this);
m_experimentsEnabled = m_globalObjectMethodTable->_javascript_ExperimentsEnabled(this);
- init(this);
+ init();
+ setGlobalThis(vm, JSProxy::create(vm, JSProxy::createStructure(vm, this, prototype()), this));
}
void finishCreation(VM& vm, JSObject* thisValue)
@@ -304,7 +306,8 @@
Base::finishCreation(vm);
structure()->setGlobalObject(vm, this);
m_experimentsEnabled = m_globalObjectMethodTable->_javascript_ExperimentsEnabled(this);
- init(thisValue);
+ init();
+ setGlobalThis(vm, thisValue);
}
struct NewGlobalVar {
@@ -537,7 +540,6 @@
VM& vm() const { return m_vm; }
JSObject* globalThis() const;
- JS_EXPORT_PRIVATE void setGlobalThis(VM&, JSObject* globalThis);
static Structure* createStructure(VM& vm, JSValue prototype)
{
@@ -590,9 +592,11 @@
private:
friend class LLIntOffsetsExtractor;
-
+
+ JS_EXPORT_PRIVATE void setGlobalThis(VM&, JSObject* globalThis);
+
// FIXME: Fold reset into init.
- JS_EXPORT_PRIVATE void init(JSObject* thisValue);
+ JS_EXPORT_PRIVATE void init();
void reset(JSValue prototype);
void createThrowTypeError(VM&);
Modified: trunk/Source/WebCore/ChangeLog (166414 => 166415)
--- trunk/Source/WebCore/ChangeLog 2014-03-28 17:58:57 UTC (rev 166414)
+++ trunk/Source/WebCore/ChangeLog 2014-03-28 18:10:39 UTC (rev 166415)
@@ -1,3 +1,14 @@
+2014-03-28 Michael Saboff <msab...@apple.com>
+
+ Unreviewed, rolling r166248 back in.
+
+ Turns out r166070 didn't cause a 2% performance loss in page load times
+
+ Reverted changeset:
+
+ Unreviewed, rolling out r166126.
+ Rollout r166126 in prepartion to roll out prerequisite r166070
+
2014-03-26 Antonio Gomes <a1.go...@sisa.samsung.com>
[Bindings] constants are always typed to 'int'
Modified: trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp (166414 => 166415)
--- trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp 2014-03-28 17:58:57 UTC (rev 166414)
+++ trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp 2014-03-28 18:10:39 UTC (rev 166415)
@@ -130,6 +130,8 @@
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;
}
@@ -141,6 +143,8 @@
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 (166414 => 166415)
--- trunk/Source/WebCore/bindings/js/WorkerScriptController.cpp 2014-03-28 17:58:57 UTC (rev 166414)
+++ trunk/Source/WebCore/bindings/js/WorkerScriptController.cpp 2014-03-28 18:10:39 UTC (rev 166415)
@@ -132,7 +132,7 @@
JSLockHolder lock(exec);
JSValue evaluationException;
- JSC::evaluate(exec, sourceCode.jsSourceCode(), m_workerGlobalScopeWrapper.get(), &evaluationException);
+ JSC::evaluate(exec, sourceCode.jsSourceCode(), m_workerGlobalScopeWrapper->globalThis(), &evaluationException);
if ((evaluationException && isTerminatedExecutionException(evaluationException)) || m_workerGlobalScopeWrapper->vm().watchdog.didFire()) {
forbidExecution();
Modified: trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.idl (166414 => 166415)
--- trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.idl 2014-03-28 17:58:57 UTC (rev 166414)
+++ trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.idl 2014-03-28 18:10:39 UTC (rev 166415)
@@ -30,6 +30,7 @@
[
GlobalContext=DedicatedWorkerGlobalScope,
+ CustomProxyToJSObject,
JSGenerateToNativeObject,
JSNoStaticTables,
] interface DedicatedWorkerGlobalScope : WorkerGlobalScope {
Modified: trunk/Source/WebCore/workers/SharedWorkerGlobalScope.idl (166414 => 166415)
--- trunk/Source/WebCore/workers/SharedWorkerGlobalScope.idl 2014-03-28 17:58:57 UTC (rev 166414)
+++ trunk/Source/WebCore/workers/SharedWorkerGlobalScope.idl 2014-03-28 18:10:39 UTC (rev 166415)
@@ -30,6 +30,7 @@
[
GlobalContext=SharedWorkerGlobalScope,
+ CustomProxyToJSObject,
Conditional=SHARED_WORKERS,
JSGenerateToNativeObject,
JSNoStaticTables,
Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.idl (166414 => 166415)
--- trunk/Source/WebCore/workers/WorkerGlobalScope.idl 2014-03-28 17:58:57 UTC (rev 166414)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.idl 2014-03-28 18:10:39 UTC (rev 166415)
@@ -26,6 +26,7 @@
[
GlobalContext=WorkerGlobalScope,
+ CustomProxyToJSObject,
JSCustomMarkFunction,
JSCustomGetOwnPropertySlotAndDescriptor,
EventTarget,