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 6316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6327 callback); | 6327 callback); |
6328 } | 6328 } |
6329 | 6329 |
6330 | 6330 |
6331 void V8::AddCallCompletedCallback(CallCompletedCallback callback) { | 6331 void V8::AddCallCompletedCallback(CallCompletedCallback callback) { |
6332 if (callback == NULL) return; | 6332 if (callback == NULL) return; |
6333 i::V8::AddCallCompletedCallback(callback); | 6333 i::V8::AddCallCompletedCallback(callback); |
6334 } | 6334 } |
6335 | 6335 |
6336 | 6336 |
| 6337 void V8::RunMicrotasks(Isolate* isolate) { |
| 6338 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
| 6339 i::HandleScope scope(i_isolate); |
| 6340 i::V8::RunMicrotasks(i_isolate); |
| 6341 } |
| 6342 |
| 6343 |
| 6344 void V8::EnqueueExternalMicrotask(Isolate* isolate, |
| 6345 MicrotaskCallback callback) { |
| 6346 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
| 6347 i::HandleScope scope(i_isolate); |
| 6348 i::V8::EnqueueExternalMicrotask(i_isolate, callback); |
| 6349 } |
| 6350 |
| 6351 |
| 6352 void V8::SetAutorunMicrotasks(Isolate* isolate, bool autorun) { |
| 6353 reinterpret_cast<i::Isolate*>(isolate)->set_autorun_microtasks(autorun); |
| 6354 } |
| 6355 |
| 6356 |
6337 void V8::RemoveCallCompletedCallback(CallCompletedCallback callback) { | 6357 void V8::RemoveCallCompletedCallback(CallCompletedCallback callback) { |
6338 i::V8::RemoveCallCompletedCallback(callback); | 6358 i::V8::RemoveCallCompletedCallback(callback); |
6339 } | 6359 } |
6340 | 6360 |
6341 | 6361 |
6342 void V8::TerminateExecution(Isolate* isolate) { | 6362 void V8::TerminateExecution(Isolate* isolate) { |
6343 // If no isolate is supplied, use the default isolate. | 6363 // If no isolate is supplied, use the default isolate. |
6344 if (isolate != NULL) { | 6364 if (isolate != NULL) { |
6345 reinterpret_cast<i::Isolate*>(isolate)->stack_guard()->TerminateExecution(); | 6365 reinterpret_cast<i::Isolate*>(isolate)->stack_guard()->TerminateExecution(); |
6346 } else { | 6366 } else { |
(...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7392 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7412 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
7393 Address callback_address = | 7413 Address callback_address = |
7394 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7414 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
7395 VMState<EXTERNAL> state(isolate); | 7415 VMState<EXTERNAL> state(isolate); |
7396 ExternalCallbackScope call_scope(isolate, callback_address); | 7416 ExternalCallbackScope call_scope(isolate, callback_address); |
7397 callback(info); | 7417 callback(info); |
7398 } | 7418 } |
7399 | 7419 |
7400 | 7420 |
7401 } } // namespace v8::internal | 7421 } } // namespace v8::internal |
OLD | NEW |