| 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 6434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6445 reinterpret_cast<i::Isolate*>(this)->stack_guard()->RequestInterrupt( | 6445 reinterpret_cast<i::Isolate*>(this)->stack_guard()->RequestInterrupt( |
| 6446 callback, data); | 6446 callback, data); |
| 6447 } | 6447 } |
| 6448 | 6448 |
| 6449 | 6449 |
| 6450 void Isolate::ClearInterrupt() { | 6450 void Isolate::ClearInterrupt() { |
| 6451 reinterpret_cast<i::Isolate*>(this)->stack_guard()->ClearInterrupt(); | 6451 reinterpret_cast<i::Isolate*>(this)->stack_guard()->ClearInterrupt(); |
| 6452 } | 6452 } |
| 6453 | 6453 |
| 6454 | 6454 |
| 6455 void Isolate::RequestGarbageCollection(bool minor) { |
| 6456 if (minor) { |
| 6457 reinterpret_cast<i::Isolate*>(this)->heap()->CollectGarbage( |
| 6458 i::NEW_SPACE, "Isolate::RequestGarbageCollection"); |
| 6459 } else { |
| 6460 reinterpret_cast<i::Isolate*>(this)->heap()->CollectAllGarbage( |
| 6461 i::Heap::kNoGCFlags, "Isolate::RequestGarbageCollection"); |
| 6462 } |
| 6463 } |
| 6464 |
| 6465 |
| 6455 Isolate* Isolate::GetCurrent() { | 6466 Isolate* Isolate::GetCurrent() { |
| 6456 i::Isolate* isolate = i::Isolate::UncheckedCurrent(); | 6467 i::Isolate* isolate = i::Isolate::UncheckedCurrent(); |
| 6457 return reinterpret_cast<Isolate*>(isolate); | 6468 return reinterpret_cast<Isolate*>(isolate); |
| 6458 } | 6469 } |
| 6459 | 6470 |
| 6460 | 6471 |
| 6461 Isolate* Isolate::New() { | 6472 Isolate* Isolate::New() { |
| 6462 i::Isolate* isolate = new i::Isolate(); | 6473 i::Isolate* isolate = new i::Isolate(); |
| 6463 return reinterpret_cast<Isolate*>(isolate); | 6474 return reinterpret_cast<Isolate*>(isolate); |
| 6464 } | 6475 } |
| (...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7458 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7469 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7459 Address callback_address = | 7470 Address callback_address = |
| 7460 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7471 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7461 VMState<EXTERNAL> state(isolate); | 7472 VMState<EXTERNAL> state(isolate); |
| 7462 ExternalCallbackScope call_scope(isolate, callback_address); | 7473 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7463 callback(info); | 7474 callback(info); |
| 7464 } | 7475 } |
| 7465 | 7476 |
| 7466 | 7477 |
| 7467 } } // namespace v8::internal | 7478 } } // namespace v8::internal |
| OLD | NEW |