Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(864)

Unified Diff: third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js

Issue 2137773002: [DevTools] Replace the target type with capabilities (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [DevTools] Replace target type with capabilities Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js b/third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js
index 4d4dcca0215b04030f4e0149b120f78ce3fab1ee..0f6231874b4e9a78f4723f8221d79cb78635962b 100644
--- a/third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js
@@ -202,10 +202,12 @@ WebInspector.AnimationModel._symbol = Symbol("AnimationModel");
/**
* @param {!WebInspector.Target} target
- * @return {!WebInspector.AnimationModel}
+ * @return {?WebInspector.AnimationModel}
*/
WebInspector.AnimationModel.fromTarget = function(target)
{
+ if (!target.hasBrowserDomains())
+ return null;
if (!target[WebInspector.AnimationModel._symbol])
target[WebInspector.AnimationModel._symbol] = new WebInspector.AnimationModel(target);

Powered by Google App Engine
This is Rietveld 408576698