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

Side by Side Diff: src/runtime.cc

Issue 346933002: Avoid crashing when Runtime_GetFrameDetails is called on a RunMicrotasks stack frame (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 <stdlib.h> 5 #include <stdlib.h>
6 #include <limits> 6 #include <limits>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 11384 matching lines...) Expand 10 before | Expand all | Expand 10 after
11395 details->set(kFrameDetailsConstructCallIndex, heap->ToBoolean(constructor)); 11395 details->set(kFrameDetailsConstructCallIndex, heap->ToBoolean(constructor));
11396 11396
11397 // Add the at return information. 11397 // Add the at return information.
11398 details->set(kFrameDetailsAtReturnIndex, heap->ToBoolean(at_return)); 11398 details->set(kFrameDetailsAtReturnIndex, heap->ToBoolean(at_return));
11399 11399
11400 // Add flags to indicate information on whether this frame is 11400 // Add flags to indicate information on whether this frame is
11401 // bit 0: invoked in the debugger context. 11401 // bit 0: invoked in the debugger context.
11402 // bit 1: optimized frame. 11402 // bit 1: optimized frame.
11403 // bit 2: inlined in optimized frame 11403 // bit 2: inlined in optimized frame
11404 int flags = 0; 11404 int flags = 0;
11405 if (*save->context() == *isolate->debug()->debug_context()) { 11405 if (!save->context().is_null() &&
11406 *save->context() == *isolate->debug()->debug_context()) {
11406 flags |= 1 << 0; 11407 flags |= 1 << 0;
11407 } 11408 }
11408 if (is_optimized) { 11409 if (is_optimized) {
11409 flags |= 1 << 1; 11410 flags |= 1 << 1;
11410 flags |= inlined_jsframe_index << 2; 11411 flags |= inlined_jsframe_index << 2;
11411 } 11412 }
11412 details->set(kFrameDetailsFlagsIndex, Smi::FromInt(flags)); 11413 details->set(kFrameDetailsFlagsIndex, Smi::FromInt(flags));
11413 11414
11414 // Fill the dynamic part. 11415 // Fill the dynamic part.
11415 int details_index = kFrameDetailsFirstDynamicIndex; 11416 int details_index = kFrameDetailsFirstDynamicIndex;
(...skipping 3797 matching lines...) Expand 10 before | Expand all | Expand 10 after
15213 } 15214 }
15214 return NULL; 15215 return NULL;
15215 } 15216 }
15216 15217
15217 15218
15218 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 15219 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
15219 return &(kIntrinsicFunctions[static_cast<int>(id)]); 15220 return &(kIntrinsicFunctions[static_cast<int>(id)]);
15220 } 15221 }
15221 15222
15222 } } // namespace v8::internal 15223 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698