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

Unified Diff: chrome/renderer/resources/extensions/last_error.js

Issue 264743014: Move chrome.runtime to //extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: prevent runtime impl from handling invalid update versions Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/api/runtime.json ('k') | extensions/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/resources/extensions/last_error.js
diff --git a/chrome/renderer/resources/extensions/last_error.js b/chrome/renderer/resources/extensions/last_error.js
index 1d2b5657b6354b959855a4e2387c0f7f6d1b35e9..6d85b11e8f9678bb6b90e0e863578fab652271ab 100644
--- a/chrome/renderer/resources/extensions/last_error.js
+++ b/chrome/renderer/resources/extensions/last_error.js
@@ -28,7 +28,7 @@ function set(name, message, stack, targetChrome) {
clear(targetChrome); // in case somebody has set a sneaky getter/setter
var errorObject = { message: message };
- if (GetAvailability('extension.lastError').is_available)
+ if (targetChrome && targetChrome.extension)
targetChrome.extension.lastError = errorObject;
assertRuntimeIsAvailable();
@@ -64,8 +64,8 @@ function clear(targetChrome) {
if (!targetChrome)
throw new Error('No target chrome to clear error');
- if (GetAvailability('extension.lastError').is_available)
- delete targetChrome.extension.lastError;
+ if (targetChrome && targetChrome.extension)
+ delete targetChrome.extension.lastError;
assertRuntimeIsAvailable();
delete targetChrome.runtime.lastError;
« no previous file with comments | « chrome/common/extensions/api/runtime.json ('k') | extensions/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698