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

Unified Diff: src/runtime.cc

Issue 343563009: Fix stack trace accessor behavior. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix for the prototype chain lookup Created 6 years, 6 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 | « src/runtime.h ('k') | test/mjsunit/regress/regress-3404.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index ba1389318c9428316d0dc033a83b6410f4cfad13..05d11bcfd91c631e5822e61895c6c49c40133c93 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -14419,30 +14419,15 @@ RUNTIME_FUNCTION(Runtime_GetScript) {
// native code offset.
RUNTIME_FUNCTION(Runtime_CollectStackTrace) {
HandleScope scope(isolate);
- ASSERT(args.length() == 3);
+ ASSERT(args.length() == 2);
CONVERT_ARG_HANDLE_CHECKED(JSObject, error_object, 0);
CONVERT_ARG_HANDLE_CHECKED(Object, caller, 1);
- CONVERT_NUMBER_CHECKED(int32_t, limit, Int32, args[2]);
// Optionally capture a more detailed stack trace for the message.
isolate->CaptureAndSetDetailedStackTrace(error_object);
// Capture a simple stack trace for the stack property.
- return *isolate->CaptureSimpleStackTrace(error_object, caller, limit);
-}
-
-
-// Retrieve the stack trace. This is the raw stack trace that yet has to
-// be formatted. Since we only need this once, clear it afterwards.
-RUNTIME_FUNCTION(Runtime_GetAndClearOverflowedStackTrace) {
- HandleScope scope(isolate);
- ASSERT(args.length() == 1);
- CONVERT_ARG_HANDLE_CHECKED(JSObject, error_object, 0);
- Handle<String> key = isolate->factory()->hidden_stack_trace_string();
- Handle<Object> result(error_object->GetHiddenProperty(key), isolate);
- if (result->IsTheHole()) return isolate->heap()->undefined_value();
- RUNTIME_ASSERT(result->IsJSArray() || result->IsUndefined());
- JSObject::DeleteHiddenProperty(error_object, key);
- return *result;
+ isolate->CaptureAndSetSimpleStackTrace(error_object, caller);
+ return isolate->heap()->undefined_value();
}
« no previous file with comments | « src/runtime.h ('k') | test/mjsunit/regress/regress-3404.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698