Index: chrome/browser/resources/file_manager/js/metadata/metadata_dispatcher.js |
diff --git a/chrome/browser/resources/file_manager/js/metadata/metadata_dispatcher.js b/chrome/browser/resources/file_manager/js/metadata/metadata_dispatcher.js |
index ffa9a39f4ee31c5b24a29b9324396f29d363177c..a6f2d957da637893592be58703ce27b916506b1a 100644 |
--- a/chrome/browser/resources/file_manager/js/metadata/metadata_dispatcher.js |
+++ b/chrome/browser/resources/file_manager/js/metadata/metadata_dispatcher.js |
@@ -214,7 +214,10 @@ MetadataDispatcher.prototype.processOneFile = function(fileURL, callback) { |
// the 'this' keyword in lambdas. |
var global = self; |
-if (global.constructor.name == 'SharedWorkerContext') { |
+// TODO(cdumez): Remove support for SharedWorkerContext name after Blink is |
+// rolled. |
+if (global.constructor.name == 'SharedWorkerContext' || |
+ global.constructor.name == 'SharedWorkerGlobalScope') { |
global.addEventListener('connect', function(e) { |
var port = e.ports[0]; |
new MetadataDispatcher(port); |