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 39 matching lines...) Loading... |
50 | 50 |
51 using v8::internal::byte; | 51 using v8::internal::byte; |
52 using v8::internal::Address; | 52 using v8::internal::Address; |
53 using v8::internal::Handle; | 53 using v8::internal::Handle; |
54 using v8::internal::Isolate; | 54 using v8::internal::Isolate; |
55 using v8::internal::JSFunction; | 55 using v8::internal::JSFunction; |
56 using v8::internal::TickSample; | 56 using v8::internal::TickSample; |
57 | 57 |
58 | 58 |
59 static bool IsAddressWithinFuncCode(JSFunction* function, Address addr) { | 59 static bool IsAddressWithinFuncCode(JSFunction* function, Address addr) { |
60 i::Code* code = function->code(); | 60 i::AbstractCode* code = function->abstract_code(); |
61 return code->contains(addr); | 61 return code->contains(addr); |
62 } | 62 } |
63 | 63 |
64 | 64 |
65 static bool IsAddressWithinFuncCode(v8::Local<v8::Context> context, | 65 static bool IsAddressWithinFuncCode(v8::Local<v8::Context> context, |
66 const char* func_name, | 66 const char* func_name, |
67 Address addr) { | 67 Address addr) { |
68 v8::Local<v8::Value> func = | 68 v8::Local<v8::Value> func = |
69 context->Global()->Get(context, v8_str(func_name)).ToLocalChecked(); | 69 context->Global()->Get(context, v8_str(func_name)).ToLocalChecked(); |
70 CHECK(func->IsFunction()); | 70 CHECK(func->IsFunction()); |
(...skipping 218 matching lines...) Loading... |
289 v8::Local<v8::Context> context = CcTest::NewContext(TRACE_EXTENSION); | 289 v8::Local<v8::Context> context = CcTest::NewContext(TRACE_EXTENSION); |
290 v8::Context::Scope context_scope(context); | 290 v8::Context::Scope context_scope(context); |
291 CHECK(!i::TraceExtension::GetJsEntrySp()); | 291 CHECK(!i::TraceExtension::GetJsEntrySp()); |
292 CompileRun("a = 1; b = a + 1;"); | 292 CompileRun("a = 1; b = a + 1;"); |
293 CHECK(!i::TraceExtension::GetJsEntrySp()); | 293 CHECK(!i::TraceExtension::GetJsEntrySp()); |
294 CompileRun("js_entry_sp();"); | 294 CompileRun("js_entry_sp();"); |
295 CHECK(!i::TraceExtension::GetJsEntrySp()); | 295 CHECK(!i::TraceExtension::GetJsEntrySp()); |
296 CompileRun("js_entry_sp_level2();"); | 296 CompileRun("js_entry_sp_level2();"); |
297 CHECK(!i::TraceExtension::GetJsEntrySp()); | 297 CHECK(!i::TraceExtension::GetJsEntrySp()); |
298 } | 298 } |
OLD | NEW |