| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 return static_cast<TestObjectPython*>(object); | 81 return static_cast<TestObjectPython*>(object); |
| 82 } | 82 } |
| 83 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestO
bjectPython*, v8::Isolate*); | 83 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestO
bjectPython*, v8::Isolate*); |
| 84 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*); | 84 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*); |
| 85 | 85 |
| 86 private: | 86 private: |
| 87 friend v8::Handle<v8::Object> wrap(TestObjectPython*, v8::Handle<v8::Object>
creationContext, v8::Isolate*); | 87 friend v8::Handle<v8::Object> wrap(TestObjectPython*, v8::Handle<v8::Object>
creationContext, v8::Isolate*); |
| 88 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestObjectPython>, v8
::Handle<v8::Object> creationContext, v8::Isolate*); | 88 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestObjectPython>, v8
::Handle<v8::Object> creationContext, v8::Isolate*); |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 template<> | |
| 92 class WrapperTypeTraits<TestObjectPython > { | |
| 93 public: | |
| 94 static const WrapperTypeInfo* wrapperTypeInfo() { return &V8TestObjectPython
::wrapperTypeInfo; } | |
| 95 }; | |
| 96 | |
| 97 inline v8::Handle<v8::Object> wrap(TestObjectPython* impl, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) | 91 inline v8::Handle<v8::Object> wrap(TestObjectPython* impl, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) |
| 98 { | 92 { |
| 99 ASSERT(impl); | 93 ASSERT(impl); |
| 100 ASSERT(!DOMDataStore::containsWrapper<V8TestObjectPython>(impl, isolate)); | 94 ASSERT(!DOMDataStore::containsWrapper<V8TestObjectPython>(impl, isolate)); |
| 101 return V8TestObjectPython::createWrapper(impl, creationContext, isolate); | 95 return V8TestObjectPython::createWrapper(impl, creationContext, isolate); |
| 102 } | 96 } |
| 103 | 97 |
| 104 inline v8::Handle<v8::Value> toV8(TestObjectPython* impl, v8::Handle<v8::Object>
creationContext, v8::Isolate* isolate) | 98 inline v8::Handle<v8::Value> toV8(TestObjectPython* impl, v8::Handle<v8::Object>
creationContext, v8::Isolate* isolate) |
| 105 { | 99 { |
| 106 if (UNLIKELY(!impl)) | 100 if (UNLIKELY(!impl)) |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 } | 163 } |
| 170 | 164 |
| 171 template<class CallbackInfo, class Wrappable> | 165 template<class CallbackInfo, class Wrappable> |
| 172 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stObjectPython> impl, Wrappable* wrappable) | 166 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stObjectPython> impl, Wrappable* wrappable) |
| 173 { | 167 { |
| 174 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); | 168 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); |
| 175 } | 169 } |
| 176 | 170 |
| 177 } | 171 } |
| 178 #endif // V8TestObjectPython_h | 172 #endif // V8TestObjectPython_h |
| OLD | NEW |