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

Unified Diff: extensions/renderer/module_system.cc

Issue 482603002: Unify logic of stack trace generation for extension errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: extensions/renderer/module_system.cc
diff --git a/extensions/renderer/module_system.cc b/extensions/renderer/module_system.cc
index 1f337643476d06ad230eab1fb4949e61ec616a8f..f12ad590802f07958f72fc7c350b80f7befa15a7 100644
--- a/extensions/renderer/module_system.cc
+++ b/extensions/renderer/module_system.cc
@@ -552,7 +552,8 @@ v8::Handle<v8::String> ModuleSystem::WrapSource(v8::Handle<v8::String> source) {
"(function(define, require, requireNative, requireAsync, exports, "
"console, privates,"
"$Array, $Function, $JSON, $Object, $RegExp, $String) {"
- "'use strict';");
+ "'use strict';"
+ "var Error = window.Error;");
not at google - send to devlin 2014/08/18 16:09:44 This isn't any more desirable than using Error in
robwu 2014/08/18 20:59:46 This protects against redefining the global Error
not at google - send to devlin 2014/08/18 23:13:10 Maybe I'm misunderstanding - that doesn't prevent
robwu 2014/08/18 23:27:18 I assumed that the module system is run before the
not at google - send to devlin 2014/08/18 23:39:16 Right. Unfortunately that's not true, these module
robwu 2014/08/19 14:21:54 Done.
v8::Handle<v8::String> right = v8::String::NewFromUtf8(GetIsolate(), "\n})");
return handle_scope.Escape(v8::Local<v8::String>(
v8::String::Concat(left, v8::String::Concat(source, right))));

Powered by Google App Engine
This is Rietveld 408576698