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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js

Issue 1962443002: [DevTools] Fix completions for "Object." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/console-cd-completions-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 } 587 }
588 588
589 /** 589 /**
590 * @param {?WebInspector.RemoteObject} object 590 * @param {?WebInspector.RemoteObject} object
591 * @this {WebInspector.ExecutionContext} 591 * @this {WebInspector.ExecutionContext}
592 */ 592 */
593 function completionsForObject(object) 593 function completionsForObject(object)
594 { 594 {
595 if (!object) 595 if (!object)
596 receivedPropertyNames.call(this, null); 596 receivedPropertyNames.call(this, null);
597 else if (object.type === "object") 597 else if (object.type === "object" || object.type === "function")
598 object.callFunctionJSON(getCompletions, [WebInspector.Remote Object.toCallArgument(object.subtype)], receivedPropertyNames.bind(this)); 598 object.callFunctionJSON(getCompletions, [WebInspector.Remote Object.toCallArgument(object.subtype)], receivedPropertyNames.bind(this));
599 else if (object.type === "string" || object.type === "number" || object.type === "boolean") 599 else if (object.type === "string" || object.type === "number" || object.type === "boolean")
600 this.evaluate("(" + getCompletions + ")(\"" + result.type + "\")", "completion", false, true, true, false, false, receivedPropertyNamesFromE val.bind(this)); 600 this.evaluate("(" + getCompletions + ")(\"" + result.type + "\")", "completion", false, true, true, false, false, receivedPropertyNamesFromE val.bind(this));
601 } 601 }
602 602
603 extractTarget(result).then(completionsForObject.bind(this)); 603 extractTarget(result).then(completionsForObject.bind(this));
604 } 604 }
605 605
606 /** 606 /**
607 * @param {?WebInspector.RemoteObject} notRelevant 607 * @param {?WebInspector.RemoteObject} notRelevant
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 /** 851 /**
852 * @param {string} listenerType 852 * @param {string} listenerType
853 */ 853 */
854 setListenerType: function(listenerType) 854 setListenerType: function(listenerType)
855 { 855 {
856 this._listenerType = listenerType; 856 this._listenerType = listenerType;
857 }, 857 },
858 858
859 __proto__: WebInspector.SDKObject.prototype 859 __proto__: WebInspector.SDKObject.prototype
860 } 860 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/console-cd-completions-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698