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

Side by Side Diff: src/bootstrapper.cc

Issue 349033007: Reland "Fix stack trace accessor behavior." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « include/v8.h ('k') | src/heap.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/bootstrapper.h" 5 #include "src/bootstrapper.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/extensions/externalize-string-extension.h" 9 #include "src/extensions/externalize-string-extension.h"
10 #include "src/extensions/free-buffer-extension.h" 10 #include "src/extensions/free-buffer-extension.h"
(...skipping 2193 matching lines...) Expand 10 before | Expand all | Expand 10 after
2204 STATIC_ASCII_VECTOR("stackTraceLimit")); 2204 STATIC_ASCII_VECTOR("stackTraceLimit"));
2205 Handle<Smi> stack_trace_limit( 2205 Handle<Smi> stack_trace_limit(
2206 Smi::FromInt(FLAG_stack_trace_limit), isolate); 2206 Smi::FromInt(FLAG_stack_trace_limit), isolate);
2207 RETURN_ON_EXCEPTION_VALUE( 2207 RETURN_ON_EXCEPTION_VALUE(
2208 isolate, 2208 isolate,
2209 JSObject::SetOwnPropertyIgnoreAttributes( 2209 JSObject::SetOwnPropertyIgnoreAttributes(
2210 Handle<JSObject>::cast(Error), name, stack_trace_limit, NONE), 2210 Handle<JSObject>::cast(Error), name, stack_trace_limit, NONE),
2211 false); 2211 false);
2212 } 2212 }
2213 2213
2214 // Expose the stack trace symbol to native JS.
2215 RETURN_ON_EXCEPTION_VALUE(
2216 isolate,
2217 JSObject::SetOwnPropertyIgnoreAttributes(
2218 handle(native_context->builtins(), isolate),
2219 factory->InternalizeOneByteString(
2220 STATIC_ASCII_VECTOR("stack_trace_symbol")),
2221 factory->stack_trace_symbol(),
2222 NONE),
2223 false);
2224
2214 // Expose the debug global object in global if a name for it is specified. 2225 // Expose the debug global object in global if a name for it is specified.
2215 if (FLAG_expose_debug_as != NULL && strlen(FLAG_expose_debug_as) != 0) { 2226 if (FLAG_expose_debug_as != NULL && strlen(FLAG_expose_debug_as) != 0) {
2216 // If loading fails we just bail out without installing the 2227 // If loading fails we just bail out without installing the
2217 // debugger but without tanking the whole context. 2228 // debugger but without tanking the whole context.
2218 Debug* debug = isolate->debug(); 2229 Debug* debug = isolate->debug();
2219 if (!debug->Load()) return true; 2230 if (!debug->Load()) return true;
2220 Handle<Context> debug_context = debug->debug_context(); 2231 Handle<Context> debug_context = debug->debug_context();
2221 // Set the security token for the debugger context to the same as 2232 // Set the security token for the debugger context to the same as
2222 // the shell native context to allow calling between these (otherwise 2233 // the shell native context to allow calling between these (otherwise
2223 // exposing debug global object doesn't make much sense). 2234 // exposing debug global object doesn't make much sense).
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
2741 return from + sizeof(NestingCounterType); 2752 return from + sizeof(NestingCounterType);
2742 } 2753 }
2743 2754
2744 2755
2745 // Called when the top-level V8 mutex is destroyed. 2756 // Called when the top-level V8 mutex is destroyed.
2746 void Bootstrapper::FreeThreadResources() { 2757 void Bootstrapper::FreeThreadResources() {
2747 ASSERT(!IsActive()); 2758 ASSERT(!IsActive());
2748 } 2759 }
2749 2760
2750 } } // namespace v8::internal 2761 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698