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

Side by Side Diff: Source/core/inspector/InjectedScriptSource.js

Issue 430503002: DevTools: Remove console last result $_ on console clear. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix test Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/inspector/console/console-last-result-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) 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
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
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 })
OLDNEW
« no previous file with comments | « LayoutTests/inspector/console/console-last-result-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698