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

Unified Diff: src/isolate.cc

Issue 2147193002: Don't call into JS from within stack trace generation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Just access the script itself, it's what the accessors do Created 4 years, 5 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 | « no previous file | src/js/messages.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index e20cd1a6ef4169598d8f47a4b93097c8d15d4eb9..bb5c11cb6b10388c2be0b967ddc31f685fb34739 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -403,6 +403,8 @@ class StackTraceHelper {
Handle<Object> Isolate::CaptureSimpleStackTrace(Handle<JSReceiver> error_object,
Handle<Object> caller) {
+ DisallowJavascriptExecution no_js(this);
+
// Get stack trace limit.
Handle<JSObject> error = error_function();
Handle<String> stackTraceLimit =
@@ -738,6 +740,7 @@ int PositionFromStackTrace(Handle<FixedArray> elements, int index) {
Handle<JSArray> Isolate::CaptureCurrentStackTrace(
int frame_limit, StackTrace::StackTraceOptions options) {
+ DisallowJavascriptExecution no_js(this);
CaptureStackTraceHelper helper(this, options);
// Ensure no negative values.
@@ -921,6 +924,7 @@ bool Isolate::MayAccess(Handle<Context> accessing_context,
Object* Isolate::StackOverflow() {
+ DisallowJavascriptExecution no_js(this);
HandleScope scope(this);
// At this point we cannot create an Error object using its javascript
// constructor. Instead, we copy the pre-constructed boilerplate and
« no previous file with comments | « no previous file | src/js/messages.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698