| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 985 } | 985 } |
| 986 var target = target ? target : WebInspector.targetManager.mainTarget(); | 986 var target = target ? target : WebInspector.targetManager.mainTarget(); |
| 987 if (!target) | 987 if (!target) |
| 988 return; | 988 return; |
| 989 | 989 |
| 990 target.runtimeAgent().evaluate(expression, "extension", exposeCommandLin
eAPI, true, contextId, returnByValue, false, false, false, onEvalute); | 990 target.runtimeAgent().evaluate(expression, "extension", exposeCommandLin
eAPI, true, contextId, returnByValue, false, false, false, onEvalute); |
| 991 | 991 |
| 992 /** | 992 /** |
| 993 * @param {?Protocol.Error} error | 993 * @param {?Protocol.Error} error |
| 994 * @param {!RuntimeAgent.RemoteObject} result | 994 * @param {!RuntimeAgent.RemoteObject} result |
| 995 * @param {boolean=} wasThrown | 995 * @param {!RuntimeAgent.ExceptionDetails=} exceptionDetails |
| 996 */ | 996 */ |
| 997 function onEvalute(error, result, wasThrown) | 997 function onEvalute(error, result, exceptionDetails) |
| 998 { | 998 { |
| 999 if (error) { | 999 if (error) { |
| 1000 callback(error, null, wasThrown); | 1000 callback(error, null, !!exceptionDetails); |
| 1001 return; | 1001 return; |
| 1002 } | 1002 } |
| 1003 callback(error, target.runtimeModel.createRemoteObject(result), wasT
hrown); | 1003 callback(error, target.runtimeModel.createRemoteObject(result), !!ex
ceptionDetails); |
| 1004 } | 1004 } |
| 1005 }, | 1005 }, |
| 1006 | 1006 |
| 1007 __proto__: WebInspector.Object.prototype | 1007 __proto__: WebInspector.Object.prototype |
| 1008 } | 1008 } |
| 1009 | 1009 |
| 1010 /** | 1010 /** |
| 1011 * @constructor | 1011 * @constructor |
| 1012 * @param {string} name | 1012 * @param {string} name |
| 1013 * @param {string} title | 1013 * @param {string} title |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1084 /** | 1084 /** |
| 1085 * @typedef {{code: string, description: string, details: !Array.<*>}} | 1085 * @typedef {{code: string, description: string, details: !Array.<*>}} |
| 1086 */ | 1086 */ |
| 1087 WebInspector.ExtensionStatus.Record; | 1087 WebInspector.ExtensionStatus.Record; |
| 1088 | 1088 |
| 1089 WebInspector.extensionAPI = {}; | 1089 WebInspector.extensionAPI = {}; |
| 1090 defineCommonExtensionSymbols(WebInspector.extensionAPI); | 1090 defineCommonExtensionSymbols(WebInspector.extensionAPI); |
| 1091 | 1091 |
| 1092 /** @type {!WebInspector.ExtensionServer} */ | 1092 /** @type {!WebInspector.ExtensionServer} */ |
| 1093 WebInspector.extensionServer; | 1093 WebInspector.extensionServer; |
| OLD | NEW |