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 copyrightdd | 8 * * Redistributions of source code must retain the above copyrightdd |
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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 _messageReceived: function(event) | 152 _messageReceived: function(event) |
153 { | 153 { |
154 var data = event.data; | 154 var data = event.data; |
155 if (data.eventName) { | 155 if (data.eventName) { |
156 if (this._eventHandler) | 156 if (this._eventHandler) |
157 this._eventHandler(data.eventName, data.data); | 157 this._eventHandler(data.eventName, data.data); |
158 return; | 158 return; |
159 } | 159 } |
160 if (data.error) { | 160 if (data.error) { |
161 if (data.errorMethodName) | 161 if (data.errorMethodName) |
162 WebInspector.console.log(WebInspector.UIString("An error happene
d when a call for method '%s' was requested", data.errorMethodName)); | 162 WebInspector.messageSink.addMessage(WebInspector.UIString("An er
ror occurred when a call to method '%s' was requested", data.errorMethodName)); |
163 WebInspector.console.log(data["errorCallStack"]); | 163 WebInspector.messageSink.addMessage(data["errorCallStack"]); |
164 delete this._callbacks[data.callId]; | 164 delete this._callbacks[data.callId]; |
165 return; | 165 return; |
166 } | 166 } |
167 if (!this._callbacks[data.callId]) | 167 if (!this._callbacks[data.callId]) |
168 return; | 168 return; |
169 var callback = this._callbacks[data.callId]; | 169 var callback = this._callbacks[data.callId]; |
170 delete this._callbacks[data.callId]; | 170 delete this._callbacks[data.callId]; |
171 callback(data.result); | 171 callback(data.result); |
172 }, | 172 }, |
173 | 173 |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 * @param {!WebInspector.HeapSnapshotCommon.ComparatorConfig} comparator | 539 * @param {!WebInspector.HeapSnapshotCommon.ComparatorConfig} comparator |
540 * @param {function()} callback | 540 * @param {function()} callback |
541 */ | 541 */ |
542 sortAndRewind: function(comparator, callback) | 542 sortAndRewind: function(comparator, callback) |
543 { | 543 { |
544 this.callMethod(callback, "sortAndRewind", comparator); | 544 this.callMethod(callback, "sortAndRewind", comparator); |
545 }, | 545 }, |
546 | 546 |
547 __proto__: WebInspector.HeapSnapshotProxyObject.prototype | 547 __proto__: WebInspector.HeapSnapshotProxyObject.prototype |
548 } | 548 } |
OLD | NEW |