| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // to match JSC bindings naming convention. | 43 // to match JSC bindings naming convention. |
| 44 | 44 |
| 45 template <class C> | 45 template <class C> |
| 46 static void npObjectNamedGetter(v8::Local<v8::String> name, const v8::PropertyCa
llbackInfo<v8::Value>& info) | 46 static void npObjectNamedGetter(v8::Local<v8::String> name, const v8::PropertyCa
llbackInfo<v8::Value>& info) |
| 47 { | 47 { |
| 48 HTMLPlugInElement* imp = C::toNative(info.Holder()); | 48 HTMLPlugInElement* imp = C::toNative(info.Holder()); |
| 49 ScriptInstance scriptInstance = imp->getInstance(); | 49 ScriptInstance scriptInstance = imp->getInstance(); |
| 50 if (!scriptInstance) | 50 if (!scriptInstance) |
| 51 return; | 51 return; |
| 52 | 52 |
| 53 v8::Local<v8::Object> instance = scriptInstance->newLocal(v8::Isolate::GetCu
rrent()); | 53 v8::Local<v8::Object> instance = scriptInstance->newLocal(info.GetIsolate())
; |
| 54 if (instance.IsEmpty()) | 54 if (instance.IsEmpty()) |
| 55 return; | 55 return; |
| 56 | 56 |
| 57 npObjectGetNamedProperty(instance, name, info); | 57 npObjectGetNamedProperty(instance, name, info); |
| 58 } | 58 } |
| 59 | 59 |
| 60 template <class C> | 60 template <class C> |
| 61 static void npObjectNamedSetter(v8::Local<v8::String> name, v8::Local<v8::Value>
value, const v8::PropertyCallbackInfo<v8::Value>& info) | 61 static void npObjectNamedSetter(v8::Local<v8::String> name, v8::Local<v8::Value>
value, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 62 { | 62 { |
| 63 HTMLPlugInElement* imp = C::toNative(info.Holder()); | 63 HTMLPlugInElement* imp = C::toNative(info.Holder()); |
| 64 ScriptInstance scriptInstance = imp->getInstance(); | 64 ScriptInstance scriptInstance = imp->getInstance(); |
| 65 if (!scriptInstance) | 65 if (!scriptInstance) |
| 66 return; | 66 return; |
| 67 | 67 |
| 68 v8::Local<v8::Object> instance = scriptInstance->newLocal(v8::Isolate::GetCu
rrent()); | 68 v8::Local<v8::Object> instance = scriptInstance->newLocal(info.GetIsolate())
; |
| 69 if (instance.IsEmpty()) | 69 if (instance.IsEmpty()) |
| 70 return; | 70 return; |
| 71 | 71 |
| 72 npObjectSetNamedProperty(instance, name, value, info); | 72 npObjectSetNamedProperty(instance, name, value, info); |
| 73 } | 73 } |
| 74 | 74 |
| 75 void V8HTMLAppletElement::namedPropertyGetterCustom(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) | 75 void V8HTMLAppletElement::namedPropertyGetterCustom(v8::Local<v8::String> name,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 76 { | 76 { |
| 77 npObjectNamedGetter<V8HTMLAppletElement>(name, info); | 77 npObjectNamedGetter<V8HTMLAppletElement>(name, info); |
| 78 } | 78 } |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 } | 118 } |
| 119 | 119 |
| 120 template <class C> | 120 template <class C> |
| 121 void npObjectIndexedGetter(uint32_t index, const v8::PropertyCallbackInfo<v8::Va
lue>& info) | 121 void npObjectIndexedGetter(uint32_t index, const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
| 122 { | 122 { |
| 123 HTMLPlugInElement* imp = C::toNative(info.Holder()); | 123 HTMLPlugInElement* imp = C::toNative(info.Holder()); |
| 124 ScriptInstance scriptInstance = imp->getInstance(); | 124 ScriptInstance scriptInstance = imp->getInstance(); |
| 125 if (!scriptInstance) | 125 if (!scriptInstance) |
| 126 return; | 126 return; |
| 127 | 127 |
| 128 v8::Local<v8::Object> instance = scriptInstance->newLocal(v8::Isolate::GetCu
rrent()); | 128 v8::Local<v8::Object> instance = scriptInstance->newLocal(info.GetIsolate())
; |
| 129 if (instance.IsEmpty()) | 129 if (instance.IsEmpty()) |
| 130 return; | 130 return; |
| 131 | 131 |
| 132 npObjectGetIndexedProperty(instance, index, info); | 132 npObjectGetIndexedProperty(instance, index, info); |
| 133 } | 133 } |
| 134 | 134 |
| 135 template <class C> | 135 template <class C> |
| 136 void npObjectIndexedSetter(uint32_t index, v8::Local<v8::Value> value, const v8:
:PropertyCallbackInfo<v8::Value>& info) | 136 void npObjectIndexedSetter(uint32_t index, v8::Local<v8::Value> value, const v8:
:PropertyCallbackInfo<v8::Value>& info) |
| 137 { | 137 { |
| 138 HTMLPlugInElement* imp = C::toNative(info.Holder()); | 138 HTMLPlugInElement* imp = C::toNative(info.Holder()); |
| 139 ScriptInstance scriptInstance = imp->getInstance(); | 139 ScriptInstance scriptInstance = imp->getInstance(); |
| 140 if (!scriptInstance) | 140 if (!scriptInstance) |
| 141 return; | 141 return; |
| 142 | 142 |
| 143 v8::Local<v8::Object> instance = scriptInstance->newLocal(v8::Isolate::GetCu
rrent()); | 143 v8::Local<v8::Object> instance = scriptInstance->newLocal(info.GetIsolate())
; |
| 144 if (instance.IsEmpty()) | 144 if (instance.IsEmpty()) |
| 145 return; | 145 return; |
| 146 | 146 |
| 147 npObjectSetIndexedProperty(instance, index, value, info); | 147 npObjectSetIndexedProperty(instance, index, value, info); |
| 148 } | 148 } |
| 149 | 149 |
| 150 void V8HTMLAppletElement::indexedPropertyGetterCustom(uint32_t index, const v8::
PropertyCallbackInfo<v8::Value>& info) | 150 void V8HTMLAppletElement::indexedPropertyGetterCustom(uint32_t index, const v8::
PropertyCallbackInfo<v8::Value>& info) |
| 151 { | 151 { |
| 152 npObjectIndexedGetter<V8HTMLAppletElement>(index, info); | 152 npObjectIndexedGetter<V8HTMLAppletElement>(index, info); |
| 153 } | 153 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 171 { | 171 { |
| 172 npObjectIndexedSetter<V8HTMLEmbedElement>(index, value, info); | 172 npObjectIndexedSetter<V8HTMLEmbedElement>(index, value, info); |
| 173 } | 173 } |
| 174 | 174 |
| 175 void V8HTMLObjectElement::indexedPropertySetterCustom(uint32_t index, v8::Local<
v8::Value> value, const v8::PropertyCallbackInfo<v8::Value>& info) | 175 void V8HTMLObjectElement::indexedPropertySetterCustom(uint32_t index, v8::Local<
v8::Value> value, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 176 { | 176 { |
| 177 npObjectIndexedSetter<V8HTMLObjectElement>(index, value, info); | 177 npObjectIndexedSetter<V8HTMLObjectElement>(index, value, info); |
| 178 } | 178 } |
| 179 | 179 |
| 180 } // namespace WebCore | 180 } // namespace WebCore |
| OLD | NEW |