Chromium Code Reviews| 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 394 #endif | 394 #endif |
| 395 } | 395 } |
| 396 | 396 |
| 397 | 397 |
| 398 void V8::SetFatalErrorHandler(FatalErrorCallback that) { | 398 void V8::SetFatalErrorHandler(FatalErrorCallback that) { |
| 399 i::Isolate* isolate = EnterIsolateIfNeeded(); | 399 i::Isolate* isolate = EnterIsolateIfNeeded(); |
| 400 isolate->set_exception_behavior(that); | 400 isolate->set_exception_behavior(that); |
| 401 } | 401 } |
| 402 | 402 |
| 403 | 403 |
| 404 void V8::SetEventLogger(LogEventCallback that) { | |
| 405 i::Isolate* isolate = EnterIsolateIfNeeded(); | |
| 406 isolate->set_event_logger(that); | |
|
Sven Panne
2014/03/05 07:47:29
This line is a *very* strong hint that SetEventLog
Yang
2014/03/05 08:18:31
I agree. I would also suggest adding it to V8::Iso
fmeawad
2014/03/06 00:24:46
Done.
| |
| 407 } | |
| 408 | |
| 409 | |
| 404 void V8::SetAllowCodeGenerationFromStringsCallback( | 410 void V8::SetAllowCodeGenerationFromStringsCallback( |
| 405 AllowCodeGenerationFromStringsCallback callback) { | 411 AllowCodeGenerationFromStringsCallback callback) { |
| 406 i::Isolate* isolate = EnterIsolateIfNeeded(); | 412 i::Isolate* isolate = EnterIsolateIfNeeded(); |
| 407 isolate->set_allow_code_gen_callback(callback); | 413 isolate->set_allow_code_gen_callback(callback); |
| 408 } | 414 } |
| 409 | 415 |
| 410 | 416 |
| 411 void V8::SetFlagsFromString(const char* str, int length) { | 417 void V8::SetFlagsFromString(const char* str, int length) { |
| 412 i::FlagList::SetFlagsFromString(str, length); | 418 i::FlagList::SetFlagsFromString(str, length); |
| 413 } | 419 } |
| (...skipping 6963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7377 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7383 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7378 Address callback_address = | 7384 Address callback_address = |
| 7379 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7385 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7380 VMState<EXTERNAL> state(isolate); | 7386 VMState<EXTERNAL> state(isolate); |
| 7381 ExternalCallbackScope call_scope(isolate, callback_address); | 7387 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7382 callback(info); | 7388 callback(info); |
| 7383 } | 7389 } |
| 7384 | 7390 |
| 7385 | 7391 |
| 7386 } } // namespace v8::internal | 7392 } } // namespace v8::internal |
| OLD | NEW |