OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * Copyright (C) 2012 Ericsson AB. All rights reserved. | 3 * Copyright (C) 2012 Ericsson AB. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 void addHiddenValueToArray(v8::Handle<v8::Object>, v8::Local<v8::Value>, int cac
heIndex, v8::Isolate*); | 702 void addHiddenValueToArray(v8::Handle<v8::Object>, v8::Local<v8::Value>, int cac
heIndex, v8::Isolate*); |
703 void removeHiddenValueFromArray(v8::Handle<v8::Object>, v8::Local<v8::Value>, in
t cacheIndex, v8::Isolate*); | 703 void removeHiddenValueFromArray(v8::Handle<v8::Object>, v8::Local<v8::Value>, in
t cacheIndex, v8::Isolate*); |
704 void moveEventListenerToNewWrapper(v8::Handle<v8::Object>, EventListener* oldVal
ue, v8::Local<v8::Value> newValue, int cacheIndex, v8::Isolate*); | 704 void moveEventListenerToNewWrapper(v8::Handle<v8::Object>, EventListener* oldVal
ue, v8::Local<v8::Value> newValue, int cacheIndex, v8::Isolate*); |
705 | 705 |
706 // Converts a DOM object to a v8 value. | 706 // Converts a DOM object to a v8 value. |
707 // This is a no-inline version of toV8(). If you want to call toV8() | 707 // This is a no-inline version of toV8(). If you want to call toV8() |
708 // without creating #include cycles, you can use this function instead. | 708 // without creating #include cycles, you can use this function instead. |
709 // Each specialized implementation will be generated. | 709 // Each specialized implementation will be generated. |
710 template<typename T> | 710 template<typename T> |
711 v8::Handle<v8::Value> toV8NoInline(T* impl, v8::Handle<v8::Object> creationConte
xt, v8::Isolate*); | 711 v8::Handle<v8::Value> toV8NoInline(T* impl, v8::Handle<v8::Object> creationConte
xt, v8::Isolate*); |
| 712 template<typename T> |
| 713 v8::Handle<v8::Value> toV8NoInline(T* impl, ExecutionContext* context) |
| 714 { |
| 715 v8::Isolate* isolate = toIsolate(context); |
| 716 v8::Handle<v8::Context> v8Context = toV8Context(context, DOMWrapperWorld::cu
rrent(isolate)); |
| 717 return toV8NoInline(impl, v8Context->Global(), isolate); |
| 718 } |
712 | 719 |
713 // Result values for platform object 'deleter' methods, | 720 // Result values for platform object 'deleter' methods, |
714 // http://www.w3.org/TR/WebIDL/#delete | 721 // http://www.w3.org/TR/WebIDL/#delete |
715 enum DeleteResult { | 722 enum DeleteResult { |
716 DeleteSuccess, | 723 DeleteSuccess, |
717 DeleteReject, | 724 DeleteReject, |
718 DeleteUnknownProperty | 725 DeleteUnknownProperty |
719 }; | 726 }; |
720 | 727 |
721 class V8IsolateInterruptor : public ThreadState::Interruptor { | 728 class V8IsolateInterruptor : public ThreadState::Interruptor { |
(...skipping 28 matching lines...) Expand all Loading... |
750 v8::HandleScope m_handleScope; | 757 v8::HandleScope m_handleScope; |
751 v8::Handle<v8::Context> m_context; | 758 v8::Handle<v8::Context> m_context; |
752 v8::Context::Scope m_contextScope; | 759 v8::Context::Scope m_contextScope; |
753 RefPtr<DOMWrapperWorld> m_world; | 760 RefPtr<DOMWrapperWorld> m_world; |
754 OwnPtr<V8PerContextData> m_perContextData; | 761 OwnPtr<V8PerContextData> m_perContextData; |
755 }; | 762 }; |
756 | 763 |
757 } // namespace WebCore | 764 } // namespace WebCore |
758 | 765 |
759 #endif // V8Binding_h | 766 #endif // V8Binding_h |
OLD | NEW |