Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / devtools / front_end / components / ExecutionContextSelector.js
index 2a3a5b2..80594a6 100644 (file)
@@ -23,8 +23,12 @@ WebInspector.ExecutionContextSelector.prototype = {
      */
     targetAdded: function(target)
     {
-        if (!WebInspector.context.flavor(WebInspector.Target))
-            WebInspector.context.setFlavor(WebInspector.Target, target);
+        // Defer selecting default target since we need all clients to get their
+        // targetAdded notifications first.
+        setImmediate(function() {
+            if (!WebInspector.context.flavor(WebInspector.Target))
+                WebInspector.context.setFlavor(WebInspector.Target, target);
+        });
     },
 
     /**