OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 return IsAddressWithinFuncCode(js_func, addr); | 72 return IsAddressWithinFuncCode(js_func, addr); |
73 } | 73 } |
74 | 74 |
75 | 75 |
76 // This C++ function is called as a constructor, to grab the frame pointer | 76 // This C++ function is called as a constructor, to grab the frame pointer |
77 // from the calling function. When this function runs, the stack contains | 77 // from the calling function. When this function runs, the stack contains |
78 // a C_Entry frame and a Construct frame above the calling function's frame. | 78 // a C_Entry frame and a Construct frame above the calling function's frame. |
79 static void construct_call(const v8::FunctionCallbackInfo<v8::Value>& args) { | 79 static void construct_call(const v8::FunctionCallbackInfo<v8::Value>& args) { |
80 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(args.GetIsolate()); | 80 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(args.GetIsolate()); |
81 i::StackFrameIterator frame_iterator(isolate); | 81 i::StackFrameIterator frame_iterator(isolate); |
82 CHECK(frame_iterator.frame()->is_exit()); | 82 CHECK(frame_iterator.frame()->is_exit() || |
| 83 frame_iterator.frame()->is_builtin_exit()); |
83 frame_iterator.Advance(); | 84 frame_iterator.Advance(); |
84 CHECK(frame_iterator.frame()->is_construct()); | 85 CHECK(frame_iterator.frame()->is_construct()); |
85 frame_iterator.Advance(); | 86 frame_iterator.Advance(); |
86 if (i::FLAG_ignition) { | 87 if (i::FLAG_ignition) { |
87 // Skip over bytecode handler frame. | 88 // Skip over bytecode handler frame. |
88 CHECK(frame_iterator.frame()->type() == i::StackFrame::STUB); | 89 CHECK(frame_iterator.frame()->type() == i::StackFrame::STUB); |
89 frame_iterator.Advance(); | 90 frame_iterator.Advance(); |
90 } | 91 } |
91 i::StackFrame* calling_frame = frame_iterator.frame(); | 92 i::StackFrame* calling_frame = frame_iterator.frame(); |
92 CHECK(calling_frame->is_java_script()); | 93 CHECK(calling_frame->is_java_script()); |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 v8::Local<v8::Context> context = CcTest::NewContext(TRACE_EXTENSION); | 292 v8::Local<v8::Context> context = CcTest::NewContext(TRACE_EXTENSION); |
292 v8::Context::Scope context_scope(context); | 293 v8::Context::Scope context_scope(context); |
293 CHECK(!i::TraceExtension::GetJsEntrySp()); | 294 CHECK(!i::TraceExtension::GetJsEntrySp()); |
294 CompileRun("a = 1; b = a + 1;"); | 295 CompileRun("a = 1; b = a + 1;"); |
295 CHECK(!i::TraceExtension::GetJsEntrySp()); | 296 CHECK(!i::TraceExtension::GetJsEntrySp()); |
296 CompileRun("js_entry_sp();"); | 297 CompileRun("js_entry_sp();"); |
297 CHECK(!i::TraceExtension::GetJsEntrySp()); | 298 CHECK(!i::TraceExtension::GetJsEntrySp()); |
298 CompileRun("js_entry_sp_level2();"); | 299 CompileRun("js_entry_sp_level2();"); |
299 CHECK(!i::TraceExtension::GetJsEntrySp()); | 300 CHECK(!i::TraceExtension::GetJsEntrySp()); |
300 } | 301 } |
OLD | NEW |