Index: third_party/WebKit/LayoutTests/security/immutable-prototype-worker.js |
diff --git a/third_party/WebKit/LayoutTests/security/immutable-prototype-worker.js b/third_party/WebKit/LayoutTests/security/immutable-prototype-worker.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7474b069e517d7d1720763fab330d37ebf9a8a6e |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/security/immutable-prototype-worker.js |
@@ -0,0 +1,19 @@ |
+importScripts('immutable-prototype.js'); |
+ |
+if (!self.postMessage) { |
+ // This is a shared worker - mimic dedicated worker APIs |
+ onconnect = function(event) { |
+ event.ports[0].onmessage = function(e) { |
+ self.postMessage = function (msg) { |
+ event.ports[0].postMessage(msg); |
+ }; |
+ run(); |
+ }; |
+ }; |
+} else { |
+ run(); |
+} |
+ |
+function run() { |
+ self.postMessage(prototypeChain(self)); |
+} |