| 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) 2014 Opera Software ASA. All rights reserved. | 3 * Copyright (C) 2014 Opera Software ASA. 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 { | 193 { |
| 194 HTMLPlugInElement* impl = ElementType::toImpl(info.Holder()); | 194 HTMLPlugInElement* impl = ElementType::toImpl(info.Holder()); |
| 195 RefPtr<SharedPersistent<v8::Object>> wrapper = impl->pluginWrapper(); | 195 RefPtr<SharedPersistent<v8::Object>> wrapper = impl->pluginWrapper(); |
| 196 if (!wrapper) | 196 if (!wrapper) |
| 197 return; | 197 return; |
| 198 | 198 |
| 199 v8::Local<v8::Object> instance = wrapper->newLocal(info.GetIsolate()); | 199 v8::Local<v8::Object> instance = wrapper->newLocal(info.GetIsolate()); |
| 200 if (instance.IsEmpty()) | 200 if (instance.IsEmpty()) |
| 201 return; | 201 return; |
| 202 | 202 |
| 203 WTF::OwnPtr<v8::Handle<v8::Value>[] > arguments = adoptArrayPtr(new v8::Hand
le<v8::Value>[info.Length()]); | 203 WTF::OwnPtr<v8::Local<v8::Value>[] > arguments = adoptArrayPtr(new v8::Local
<v8::Value>[info.Length()]); |
| 204 for (int i = 0; i < info.Length(); ++i) | 204 for (int i = 0; i < info.Length(); ++i) |
| 205 arguments[i] = info[i]; | 205 arguments[i] = info[i]; |
| 206 | 206 |
| 207 TONATIVE_VOID(v8::Local<v8::Value>, retVal, instance->CallAsFunction(info.Th
is(), info.Length(), arguments.get())); | 207 TONATIVE_VOID(v8::Local<v8::Value>, retVal, instance->CallAsFunction(info.Th
is(), info.Length(), arguments.get())); |
| 208 v8SetReturnValue(info, retVal); | 208 v8SetReturnValue(info, retVal); |
| 209 } | 209 } |
| 210 | 210 |
| 211 } // namespace | 211 } // namespace |
| 212 | 212 |
| 213 void V8HTMLEmbedElement::legacyCallCustom(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 213 void V8HTMLEmbedElement::legacyCallCustom(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
| 214 { | 214 { |
| 215 invokeOnScriptableObject<V8HTMLEmbedElement>(info); | 215 invokeOnScriptableObject<V8HTMLEmbedElement>(info); |
| 216 UseCounter::countIfNotPrivateScript(info.GetIsolate(), V8HTMLEmbedElement::t
oImpl(info.Holder())->document(), UseCounter::HTMLEmbedElementLegacyCall); | 216 UseCounter::countIfNotPrivateScript(info.GetIsolate(), V8HTMLEmbedElement::t
oImpl(info.Holder())->document(), UseCounter::HTMLEmbedElementLegacyCall); |
| 217 } | 217 } |
| 218 | 218 |
| 219 void V8HTMLObjectElement::legacyCallCustom(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 219 void V8HTMLObjectElement::legacyCallCustom(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
| 220 { | 220 { |
| 221 invokeOnScriptableObject<V8HTMLObjectElement>(info); | 221 invokeOnScriptableObject<V8HTMLObjectElement>(info); |
| 222 UseCounter::countIfNotPrivateScript(info.GetIsolate(), V8HTMLObjectElement::
toImpl(info.Holder())->document(), UseCounter::HTMLObjectElementLegacyCall); | 222 UseCounter::countIfNotPrivateScript(info.GetIsolate(), V8HTMLObjectElement::
toImpl(info.Holder())->document(), UseCounter::HTMLObjectElementLegacyCall); |
| 223 } | 223 } |
| 224 | 224 |
| 225 } // namespace blink | 225 } // namespace blink |
| OLD | NEW |