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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
669 void V8::ClearWeak(i::Object** obj) { | 669 void V8::ClearWeak(i::Object** obj) { |
670 i::GlobalHandles::ClearWeakness(obj); | 670 i::GlobalHandles::ClearWeakness(obj); |
671 } | 671 } |
672 | 672 |
673 | 673 |
674 void V8::DisposeGlobal(i::Object** obj) { | 674 void V8::DisposeGlobal(i::Object** obj) { |
675 i::GlobalHandles::Destroy(obj); | 675 i::GlobalHandles::Destroy(obj); |
676 } | 676 } |
677 | 677 |
678 | 678 |
679 int V8::Eternalize(i::Isolate* isolate, i::Object** handle) { | 679 void V8::Eternalize(i::Isolate* isolate, i::Object** handle, int* index) { |
rossberg
2013/08/12 15:13:13
Is there a reason for changing this? I'd keep the
dcarney
2013/08/13 06:46:24
The assertion that you're not reinitializing an et
| |
680 return isolate->eternal_handles()->Create(isolate, *handle); | 680 isolate->eternal_handles()->Create(isolate, *handle, index); |
681 } | 681 } |
682 | 682 |
683 | 683 |
684 i::Object** V8::GetEternal(i::Isolate* isolate, int index) { | 684 i::Object** V8::GetEternal(i::Isolate* isolate, int index) { |
685 return isolate->eternal_handles()->Get(index).location(); | 685 return isolate->eternal_handles()->Get(index).location(); |
686 } | 686 } |
687 | 687 |
688 | 688 |
689 // --- H a n d l e s --- | 689 // --- H a n d l e s --- |
690 | 690 |
(...skipping 7482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8173 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 8173 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
8174 Address callback_address = | 8174 Address callback_address = |
8175 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8175 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
8176 VMState<EXTERNAL> state(isolate); | 8176 VMState<EXTERNAL> state(isolate); |
8177 ExternalCallbackScope call_scope(isolate, callback_address); | 8177 ExternalCallbackScope call_scope(isolate, callback_address); |
8178 return callback(info); | 8178 return callback(info); |
8179 } | 8179 } |
8180 | 8180 |
8181 | 8181 |
8182 } } // namespace v8::internal | 8182 } } // namespace v8::internal |
OLD | NEW |