| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 return static_cast<TestInterfaceDocument*>(V8Document::fromInternalPoint
er(object)); | 64 return static_cast<TestInterfaceDocument*>(V8Document::fromInternalPoint
er(object)); |
| 65 } | 65 } |
| 66 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI
nterfaceDocument*, v8::Isolate*) { } | 66 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI
nterfaceDocument*, v8::Isolate*) { } |
| 67 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*) { } | 67 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*) { } |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 friend v8::Handle<v8::Object> wrap(TestInterfaceDocument*, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate*); | 70 friend v8::Handle<v8::Object> wrap(TestInterfaceDocument*, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate*); |
| 71 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestInterfaceDocument
>, v8::Handle<v8::Object> creationContext, v8::Isolate*); | 71 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestInterfaceDocument
>, v8::Handle<v8::Object> creationContext, v8::Isolate*); |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 template<> | |
| 75 class WrapperTypeTraits<TestInterfaceDocument > { | |
| 76 public: | |
| 77 static const WrapperTypeInfo* wrapperTypeInfo() { return &V8TestInterfaceDoc
ument::wrapperTypeInfo; } | |
| 78 }; | |
| 79 | |
| 80 v8::Handle<v8::Object> wrap(TestInterfaceDocument* impl, v8::Handle<v8::Object>
creationContext, v8::Isolate*); | 74 v8::Handle<v8::Object> wrap(TestInterfaceDocument* impl, v8::Handle<v8::Object>
creationContext, v8::Isolate*); |
| 81 | 75 |
| 82 inline v8::Handle<v8::Value> toV8(TestInterfaceDocument* impl, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate* isolate) | 76 inline v8::Handle<v8::Value> toV8(TestInterfaceDocument* impl, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate* isolate) |
| 83 { | 77 { |
| 84 if (UNLIKELY(!impl)) | 78 if (UNLIKELY(!impl)) |
| 85 return v8::Null(isolate); | 79 return v8::Null(isolate); |
| 86 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestInterfaceDocu
ment>(impl, isolate); | 80 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestInterfaceDocu
ment>(impl, isolate); |
| 87 if (!wrapper.IsEmpty()) | 81 if (!wrapper.IsEmpty()) |
| 88 return wrapper; | 82 return wrapper; |
| 89 return wrap(impl, creationContext, isolate); | 83 return wrap(impl, creationContext, isolate); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 } | 141 } |
| 148 | 142 |
| 149 template<class CallbackInfo, class Wrappable> | 143 template<class CallbackInfo, class Wrappable> |
| 150 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stInterfaceDocument> impl, Wrappable* wrappable) | 144 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stInterfaceDocument> impl, Wrappable* wrappable) |
| 151 { | 145 { |
| 152 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); | 146 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); |
| 153 } | 147 } |
| 154 | 148 |
| 155 } | 149 } |
| 156 #endif // V8TestInterfaceDocument_h | 150 #endif // V8TestInterfaceDocument_h |
| OLD | NEW |