Update metadata_dispatcher.js to check for SharedWorkerGlobalScope only

Update metadata_dispatcher.js to check for SharedWorkerGlobalScope only and stop
checking for SharedWorkerContext now that Blink has rolled.

WorkerContext was renamed to WorkerGlobalScope in order to match the latest
specification in Blink r153030.

R=arv

Review URL: https://chromiumcodereview.appspot.com/18133010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209332 0039d316-1c4b-4281-b951-d872f2087c98
parent ec0de093
......@@ -214,10 +214,7 @@ MetadataDispatcher.prototype.processOneFile = function(fileURL, callback) {
// the 'this' keyword in lambdas.
var global = self;
// TODO(cdumez): Remove support for SharedWorkerContext name after Blink is
// rolled.
if (global.constructor.name == 'SharedWorkerContext' ||
global.constructor.name == 'SharedWorkerGlobalScope') {
if (global.constructor.name == 'SharedWorkerGlobalScope') {
global.addEventListener('connect', function(e) {
var port = e.ports[0];
new MetadataDispatcher(port);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment