OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 _parseObjectId: function(objectId) | 352 _parseObjectId: function(objectId) |
353 { | 353 { |
354 return nullifyObjectProto(InjectedScriptHost.eval("(" + objectId + ")"))
; | 354 return nullifyObjectProto(InjectedScriptHost.eval("(" + objectId + ")"))
; |
355 }, | 355 }, |
356 | 356 |
357 /** | 357 /** |
358 * @param {string} objectGroupName | 358 * @param {string} objectGroupName |
359 */ | 359 */ |
360 releaseObjectGroup: function(objectGroupName) | 360 releaseObjectGroup: function(objectGroupName) |
361 { | 361 { |
| 362 if (objectGroupName === "console") |
| 363 delete this._lastResult; |
362 var group = this._objectGroups[objectGroupName]; | 364 var group = this._objectGroups[objectGroupName]; |
363 if (!group) | 365 if (!group) |
364 return; | 366 return; |
365 for (var i = 0; i < group.length; i++) | 367 for (var i = 0; i < group.length; i++) |
366 this._releaseObject(group[i]); | 368 this._releaseObject(group[i]); |
367 delete this._objectGroups[objectGroupName]; | 369 delete this._objectGroups[objectGroupName]; |
368 }, | 370 }, |
369 | 371 |
370 /** | 372 /** |
371 * @param {string} methodName | 373 * @param {string} methodName |
(...skipping 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1699 */ | 1701 */ |
1700 _logEvent: function(event) | 1702 _logEvent: function(event) |
1701 { | 1703 { |
1702 inspectedWindow.console.log(event.type, event); | 1704 inspectedWindow.console.log(event.type, event); |
1703 } | 1705 } |
1704 } | 1706 } |
1705 | 1707 |
1706 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl(); | 1708 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl(); |
1707 return injectedScript; | 1709 return injectedScript; |
1708 }) | 1710 }) |
OLD | NEW |