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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js

Issue 1413593008: DevTools: straw man adaptable implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/sdk/DOMModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js
index 37b1f2269346894dfe6a25d6a8a3a0882c75f12a..d0e72683e1399b311b8d73491b3ac67157f40ac6 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js
@@ -928,7 +928,7 @@ WebInspector.DOMNode.prototype = {
if (object)
fulfill(object)
else
- reject(null);
+ reject(new Error());
}
}
},
@@ -2212,3 +2212,24 @@ WebInspector.DOMModel.fromTarget = function(target)
{
return /** @type {?WebInspector.DOMModel} */ (target.model(WebInspector.DOMModel));
}
+
+/**
+ * @constructor
+ * @implements {Runtime.Adapter}
+ */
+WebInspector.DOMNode.ToRemoteObject = function()
+{
+}
+
+WebInspector.DOMNode.ToRemoteObject.prototype = {
+ /**
+ * @override
+ * @param {!Object} from
+ * @return {!Promise<?Object>}
+ */
+ adapt: function(from)
+ {
+ var domNode = /** @type {!WebInspector.DOMNode} */ (from);
+ return /** @type {!Promise<?Object>} */ (domNode.resolveToObjectPromise("leaky"));
+ }
+}
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/Runtime.js ('k') | third_party/WebKit/Source/devtools/front_end/sdk/module.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698