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

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

Issue 306893003: Fix channel check for fatal error suppression. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove CHECK in IsAvailable 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/chrome_extensions_client.cc ('k') | extensions/common/extension_api.cc » ('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 2cf394755cc3d23010c9babaf9976fad2665be51..b096aa4e366d6d371a92fbc0ed5a6acd6d2f3dbc 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 (targetChrome && targetChrome.extension)
+ if (GetAvailability('extension.lastError').is_available)
targetChrome.extension.lastError = errorObject;
assertRuntimeIsAvailable();
@@ -81,7 +81,7 @@ function clear(targetChrome) {
if (!targetChrome)
throw new Error('No target chrome to clear error');
- if (targetChrome && targetChrome.extension)
+ if (GetAvailability('extension.lastError').is_available)
delete targetChrome.extension.lastError;
assertRuntimeIsAvailable();
« no previous file with comments | « chrome/common/extensions/chrome_extensions_client.cc ('k') | extensions/common/extension_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698