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

Side by Side Diff: src/bootstrapper.cc

Issue 151145: Experimental: capture 10 frame stack trace by default. (Closed)
Patch Set: Created 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 Handle<JSGlobalObject> js_global( 1206 Handle<JSGlobalObject> js_global(
1207 JSGlobalObject::cast(global_context()->global())); 1207 JSGlobalObject::cast(global_context()->global()));
1208 // Expose the natives in global if a name for it is specified. 1208 // Expose the natives in global if a name for it is specified.
1209 if (FLAG_expose_natives_as != NULL && strlen(FLAG_expose_natives_as) != 0) { 1209 if (FLAG_expose_natives_as != NULL && strlen(FLAG_expose_natives_as) != 0) {
1210 Handle<String> natives_string = 1210 Handle<String> natives_string =
1211 Factory::LookupAsciiSymbol(FLAG_expose_natives_as); 1211 Factory::LookupAsciiSymbol(FLAG_expose_natives_as);
1212 SetProperty(js_global, natives_string, 1212 SetProperty(js_global, natives_string,
1213 Handle<JSObject>(js_global->builtins()), DONT_ENUM); 1213 Handle<JSObject>(js_global->builtins()), DONT_ENUM);
1214 } 1214 }
1215 1215
1216 if (FLAG_capture_stack_traces) { 1216 Handle<Object> Error = GetProperty(js_global, "Error");
1217 Handle<Object> Error = GetProperty(js_global, "Error"); 1217 if (Error->IsJSObject()) {
1218 if (Error->IsJSObject()) { 1218 Handle<String> name = Factory::LookupAsciiSymbol("stackTraceLimit");
1219 Handle<String> name = Factory::LookupAsciiSymbol("captureStackTraces"); 1219 SetProperty(Handle<JSObject>::cast(Error),
1220 SetProperty(Handle<JSObject>::cast(Error), 1220 name,
1221 name, 1221 Handle<Smi>(Smi::FromInt(FLAG_stack_trace_limit)),
1222 Factory::true_value(), 1222 NONE);
1223 NONE);
1224 }
1225 } 1223 }
1226 1224
1227 #ifdef ENABLE_DEBUGGER_SUPPORT 1225 #ifdef ENABLE_DEBUGGER_SUPPORT
1228 // Expose the debug global object in global if a name for it is specified. 1226 // Expose the debug global object in global if a name for it is specified.
1229 if (FLAG_expose_debug_as != NULL && strlen(FLAG_expose_debug_as) != 0) { 1227 if (FLAG_expose_debug_as != NULL && strlen(FLAG_expose_debug_as) != 0) {
1230 // If loading fails we just bail out without installing the 1228 // If loading fails we just bail out without installing the
1231 // debugger but without tanking the whole context. 1229 // debugger but without tanking the whole context.
1232 if (!Debug::Load()) 1230 if (!Debug::Load())
1233 return true; 1231 return true;
1234 // Set the security token for the debugger context to the same as 1232 // Set the security token for the debugger context to the same as
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
1626 } 1624 }
1627 1625
1628 1626
1629 // Restore statics that are thread local. 1627 // Restore statics that are thread local.
1630 char* Genesis::RestoreState(char* from) { 1628 char* Genesis::RestoreState(char* from) {
1631 current_ = *reinterpret_cast<Genesis**>(from); 1629 current_ = *reinterpret_cast<Genesis**>(from);
1632 return from + sizeof(current_); 1630 return from + sizeof(current_);
1633 } 1631 }
1634 1632
1635 } } // namespace v8::internal 1633 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698