OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 5129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5140 i::V8::SetEntropySource(source); | 5140 i::V8::SetEntropySource(source); |
5141 } | 5141 } |
5142 | 5142 |
5143 | 5143 |
5144 void v8::V8::SetReturnAddressLocationResolver( | 5144 void v8::V8::SetReturnAddressLocationResolver( |
5145 ReturnAddressLocationResolver return_address_resolver) { | 5145 ReturnAddressLocationResolver return_address_resolver) { |
5146 i::V8::SetReturnAddressLocationResolver(return_address_resolver); | 5146 i::V8::SetReturnAddressLocationResolver(return_address_resolver); |
5147 } | 5147 } |
5148 | 5148 |
5149 | 5149 |
5150 bool v8::V8::SetFunctionEntryHook(FunctionEntryHook entry_hook) { | 5150 bool v8::V8::SetFunctionEntryHook(FunctionEntryHook entry_hook) { |
danno
2013/06/13 15:33:44
API calls should take an Isolate parameter if you
Sigurður Ásgeirsson
2013/06/19 20:51:51
Done.
| |
5151 return i::ProfileEntryHookStub::SetFunctionEntryHook(entry_hook); | 5151 i::Isolate* isolate = i::Isolate::Current(); |
5152 | |
5153 // We don't allow switching from one hook to another, as hooks don't stack. | |
5154 // This way a second user can at least detect that there's a problem. | |
5155 if (entry_hook != NULL && isolate->HasFunctionEntryHook()) | |
danno
2013/06/13 15:33:44
Seems like this should be a ASSERT(entry_hook != N
Sigurður Ásgeirsson
2013/06/19 20:51:51
Done.
| |
5156 return false; | |
5157 | |
5158 isolate->SetFunctionEntryHook(entry_hook); | |
danno
2013/06/13 15:33:44
It would be great to introduce some checks to make
Sigurður Ásgeirsson
2013/06/19 20:51:51
Done.
| |
5159 return true; | |
5152 } | 5160 } |
5153 | 5161 |
5154 | 5162 |
5155 void v8::V8::SetJitCodeEventHandler( | 5163 void v8::V8::SetJitCodeEventHandler( |
5156 JitCodeEventOptions options, JitCodeEventHandler event_handler) { | 5164 JitCodeEventOptions options, JitCodeEventHandler event_handler) { |
5157 i::Isolate* isolate = i::Isolate::Current(); | 5165 i::Isolate* isolate = i::Isolate::Current(); |
5158 // Ensure that logging is initialized for our isolate. | 5166 // Ensure that logging is initialized for our isolate. |
5159 isolate->InitializeLoggingAndCounters(); | 5167 isolate->InitializeLoggingAndCounters(); |
5160 isolate->logger()->SetCodeEventHandler(options, event_handler); | 5168 isolate->logger()->SetCodeEventHandler(options, event_handler); |
5161 } | 5169 } |
(...skipping 2834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7996 | 8004 |
7997 v->VisitPointers(blocks_.first(), first_block_limit_); | 8005 v->VisitPointers(blocks_.first(), first_block_limit_); |
7998 | 8006 |
7999 for (int i = 1; i < blocks_.length(); i++) { | 8007 for (int i = 1; i < blocks_.length(); i++) { |
8000 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); | 8008 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); |
8001 } | 8009 } |
8002 } | 8010 } |
8003 | 8011 |
8004 | 8012 |
8005 } } // namespace v8::internal | 8013 } } // namespace v8::internal |
OLD | NEW |