Title: [106684] trunk/LayoutTests
Revision
106684
Author
[email protected]
Date
2012-02-03 12:46:37 -0800 (Fri, 03 Feb 2012)

Log Message

Make js-test-pre.js more worker friendly
https://bugs.webkit.org/show_bug.cgi?id=77487

Replace uses of 'window' with 'self'.

Reviewed by Ojan Vafai.

* fast/js/resources/js-test-pre.js:
* storage/indexeddb/resources/basics.js:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (106683 => 106684)


--- trunk/LayoutTests/ChangeLog	2012-02-03 20:22:21 UTC (rev 106683)
+++ trunk/LayoutTests/ChangeLog	2012-02-03 20:46:37 UTC (rev 106684)
@@ -1,3 +1,15 @@
+2012-02-03  David Grogan  <[email protected]>
+
+        Make js-test-pre.js more worker friendly
+        https://bugs.webkit.org/show_bug.cgi?id=77487
+
+        Replace uses of 'window' with 'self'.
+
+        Reviewed by Ojan Vafai.
+
+        * fast/js/resources/js-test-pre.js:
+        * storage/indexeddb/resources/basics.js:
+
 2012-02-03  Jochen Eisinger  <[email protected]>
 
         Remove unneccesary canExecuteScripts check from v8 bindings, and correctly indeicate when we're about to execute a script

Modified: trunk/LayoutTests/fast/js/resources/js-test-pre.js (106683 => 106684)


--- trunk/LayoutTests/fast/js/resources/js-test-pre.js	2012-02-03 20:22:21 UTC (rev 106683)
+++ trunk/LayoutTests/fast/js/resources/js-test-pre.js	2012-02-03 20:46:37 UTC (rev 106684)
@@ -1,6 +1,6 @@
 // svg/dynamic-updates tests set enablePixelTesting=true, as we want to dump text + pixel results
-if (window.layoutTestController)
-    layoutTestController.dumpAsText(window.enablePixelTesting);
+if (self.layoutTestController)
+    layoutTestController.dumpAsText(self.enablePixelTesting);
 
 var description, debug, successfullyParsed, errorMessage;
 
@@ -77,7 +77,7 @@
     if (!isWorker())
         insertStyleSheet();
 
-    window._onerror_ = function(message)
+    self._onerror_ = function(message)
     {
         errorMessage = message;
     };
@@ -418,9 +418,9 @@
 function finishJSTest()
 {
     wasFinishJSTestCalled = true;
-    if (!window.wasPostTestScriptParsed)
+    if (!self.wasPostTestScriptParsed)
         return;
     isSuccessfullyParsed();
-    if (window.jsTestIsAsync && window.layoutTestController)
+    if (self.jsTestIsAsync && self.layoutTestController)
         layoutTestController.notifyDone();
 }

Modified: trunk/LayoutTests/storage/indexeddb/resources/basics.js (106683 => 106684)


--- trunk/LayoutTests/storage/indexeddb/resources/basics.js	2012-02-03 20:22:21 UTC (rev 106683)
+++ trunk/LayoutTests/storage/indexeddb/resources/basics.js	2012-02-03 20:46:37 UTC (rev 106684)
@@ -1,7 +1,4 @@
 if (this.importScripts) {
-    // FIXME: Change js-test-pre.js to use self in place of window where
-    // possible, so we can remove the next line.  http://webkit.org/b/76762
-    window = self;
     importScripts('../../../fast/js/resources/js-test-pre.js');
     importScripts('idb-worker-common.js');
     importScripts('shared.js');
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to