| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 #include "bindings/v8/V8ObjectConstructor.h" | 71 #include "bindings/v8/V8ObjectConstructor.h" |
| 72 #include "bindings/v8/custom/V8ArrayBufferCustom.h" | 72 #include "bindings/v8/custom/V8ArrayBufferCustom.h" |
| 73 #include "bindings/v8/custom/V8ArrayBufferViewCustom.h" | 73 #include "bindings/v8/custom/V8ArrayBufferViewCustom.h" |
| 74 #include "bindings/v8/custom/V8Float32ArrayCustom.h" | 74 #include "bindings/v8/custom/V8Float32ArrayCustom.h" |
| 75 #include "bindings/v8/custom/V8Int32ArrayCustom.h" | 75 #include "bindings/v8/custom/V8Int32ArrayCustom.h" |
| 76 #include "bindings/v8/custom/V8Uint8ArrayCustom.h" | 76 #include "bindings/v8/custom/V8Uint8ArrayCustom.h" |
| 77 #include "core/css/MediaQueryListListener.h" | 77 #include "core/css/MediaQueryListListener.h" |
| 78 #include "core/dom/ContextFeatures.h" | 78 #include "core/dom/ContextFeatures.h" |
| 79 #include "core/dom/Document.h" | 79 #include "core/dom/Document.h" |
| 80 #include "core/dom/custom/CustomElementCallbackDispatcher.h" | 80 #include "core/dom/custom/CustomElementCallbackDispatcher.h" |
| 81 #include "core/frame/DOMWindow.h" |
| 81 #include "core/frame/UseCounter.h" | 82 #include "core/frame/UseCounter.h" |
| 82 #include "core/inspector/ScriptArguments.h" | 83 #include "core/inspector/ScriptArguments.h" |
| 83 #include "platform/TraceEvent.h" | 84 #include "platform/TraceEvent.h" |
| 84 #include "wtf/GetPtr.h" | 85 #include "wtf/GetPtr.h" |
| 85 #include "wtf/RefPtr.h" | 86 #include "wtf/RefPtr.h" |
| 86 | 87 |
| 87 namespace WebCore { | 88 namespace WebCore { |
| 88 | 89 |
| 89 static void initializeScriptWrappableForInterface(TestObjectPython* object) | 90 static void initializeScriptWrappableForInterface(TestObjectPython* object) |
| 90 { | 91 { |
| (...skipping 5230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5321 impl->voidMethodDictionaryArg(dictionaryArg); | 5322 impl->voidMethodDictionaryArg(dictionaryArg); |
| 5322 } | 5323 } |
| 5323 | 5324 |
| 5324 static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 5325 static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 5325 { | 5326 { |
| 5326 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 5327 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 5327 TestObjectPythonV8Internal::voidMethodDictionaryArgMethod(info); | 5328 TestObjectPythonV8Internal::voidMethodDictionaryArgMethod(info); |
| 5328 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 5329 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 5329 } | 5330 } |
| 5330 | 5331 |
| 5332 static void voidMethodEventListenerArgMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 5333 { |
| 5334 if (UNLIKELY(info.Length() < 1)) { |
| 5335 throwTypeError(ExceptionMessages::failedToExecute("voidMethodEventListen
erArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length
())), info.GetIsolate()); |
| 5336 return; |
| 5337 } |
| 5338 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder()); |
| 5339 RefPtr<EventListener> eventListenerArg = V8EventListenerList::getEventListen
er(info[1], false, ListenerFindOrCreate); |
| 5340 impl->voidMethodEventListenerArg(eventListenerArg); |
| 5341 } |
| 5342 |
| 5343 static void voidMethodEventListenerArgMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 5344 { |
| 5345 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 5346 TestObjectPythonV8Internal::voidMethodEventListenerArgMethod(info); |
| 5347 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 5348 } |
| 5349 |
| 5331 static void voidMethodNodeFilterArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) | 5350 static void voidMethodNodeFilterArgMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
| 5332 { | 5351 { |
| 5333 if (UNLIKELY(info.Length() < 1)) { | 5352 if (UNLIKELY(info.Length() < 1)) { |
| 5334 throwTypeError(ExceptionMessages::failedToExecute("voidMethodNodeFilterA
rg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())
), info.GetIsolate()); | 5353 throwTypeError(ExceptionMessages::failedToExecute("voidMethodNodeFilterA
rg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())
), info.GetIsolate()); |
| 5335 return; | 5354 return; |
| 5336 } | 5355 } |
| 5337 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder()); | 5356 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder()); |
| 5338 V8TRYCATCH_VOID(RefPtr<NodeFilter>, nodeFilterArg, toNodeFilter(info[0], inf
o.GetIsolate())); | 5357 V8TRYCATCH_VOID(RefPtr<NodeFilter>, nodeFilterArg, toNodeFilter(info[0], inf
o.GetIsolate())); |
| 5339 impl->voidMethodNodeFilterArg(nodeFilterArg.release()); | 5358 impl->voidMethodNodeFilterArg(nodeFilterArg.release()); |
| 5340 } | 5359 } |
| (...skipping 2157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7498 {"voidMethodOptionalTestCallbackInterfaceArg", TestObjectPythonV8Internal::v
oidMethodOptionalTestCallbackInterfaceArgMethodCallback, 0, 0}, | 7517 {"voidMethodOptionalTestCallbackInterfaceArg", TestObjectPythonV8Internal::v
oidMethodOptionalTestCallbackInterfaceArgMethodCallback, 0, 0}, |
| 7499 {"voidMethodTestCallbackInterfaceOrNullArg", TestObjectPythonV8Internal::voi
dMethodTestCallbackInterfaceOrNullArgMethodCallback, 0, 1}, | 7518 {"voidMethodTestCallbackInterfaceOrNullArg", TestObjectPythonV8Internal::voi
dMethodTestCallbackInterfaceOrNullArgMethodCallback, 0, 1}, |
| 7500 {"testEnumMethod", TestObjectPythonV8Internal::testEnumMethodMethodCallback,
0, 0}, | 7519 {"testEnumMethod", TestObjectPythonV8Internal::testEnumMethodMethodCallback,
0, 0}, |
| 7501 {"voidMethodTestEnumArg", TestObjectPythonV8Internal::voidMethodTestEnumArgM
ethodCallback, 0, 1}, | 7520 {"voidMethodTestEnumArg", TestObjectPythonV8Internal::voidMethodTestEnumArgM
ethodCallback, 0, 1}, |
| 7502 {"dictionaryMethod", TestObjectPythonV8Internal::dictionaryMethodMethodCallb
ack, 0, 0}, | 7521 {"dictionaryMethod", TestObjectPythonV8Internal::dictionaryMethodMethodCallb
ack, 0, 0}, |
| 7503 {"nodeFilterMethod", TestObjectPythonV8Internal::nodeFilterMethodMethodCallb
ack, 0, 0}, | 7522 {"nodeFilterMethod", TestObjectPythonV8Internal::nodeFilterMethodMethodCallb
ack, 0, 0}, |
| 7504 {"promiseMethod", TestObjectPythonV8Internal::promiseMethodMethodCallback, 0
, 0}, | 7523 {"promiseMethod", TestObjectPythonV8Internal::promiseMethodMethodCallback, 0
, 0}, |
| 7505 {"serializedScriptValueMethod", TestObjectPythonV8Internal::serializedScript
ValueMethodMethodCallback, 0, 0}, | 7524 {"serializedScriptValueMethod", TestObjectPythonV8Internal::serializedScript
ValueMethodMethodCallback, 0, 0}, |
| 7506 {"xPathNSResolverMethod", TestObjectPythonV8Internal::xPathNSResolverMethodM
ethodCallback, 0, 0}, | 7525 {"xPathNSResolverMethod", TestObjectPythonV8Internal::xPathNSResolverMethodM
ethodCallback, 0, 0}, |
| 7507 {"voidMethodDictionaryArg", TestObjectPythonV8Internal::voidMethodDictionary
ArgMethodCallback, 0, 1}, | 7526 {"voidMethodDictionaryArg", TestObjectPythonV8Internal::voidMethodDictionary
ArgMethodCallback, 0, 1}, |
| 7527 {"voidMethodEventListenerArg", TestObjectPythonV8Internal::voidMethodEventLi
stenerArgMethodCallback, 0, 1}, |
| 7508 {"voidMethodNodeFilterArg", TestObjectPythonV8Internal::voidMethodNodeFilter
ArgMethodCallback, 0, 1}, | 7528 {"voidMethodNodeFilterArg", TestObjectPythonV8Internal::voidMethodNodeFilter
ArgMethodCallback, 0, 1}, |
| 7509 {"voidMethodPromiseArg", TestObjectPythonV8Internal::voidMethodPromiseArgMet
hodCallback, 0, 1}, | 7529 {"voidMethodPromiseArg", TestObjectPythonV8Internal::voidMethodPromiseArgMet
hodCallback, 0, 1}, |
| 7510 {"voidMethodSerializedScriptValueArg", TestObjectPythonV8Internal::voidMetho
dSerializedScriptValueArgMethodCallback, 0, 1}, | 7530 {"voidMethodSerializedScriptValueArg", TestObjectPythonV8Internal::voidMetho
dSerializedScriptValueArgMethodCallback, 0, 1}, |
| 7511 {"voidMethodXPathNSResolverArg", TestObjectPythonV8Internal::voidMethodXPath
NSResolverArgMethodCallback, 0, 1}, | 7531 {"voidMethodXPathNSResolverArg", TestObjectPythonV8Internal::voidMethodXPath
NSResolverArgMethodCallback, 0, 1}, |
| 7512 {"voidMethodSequenceDictionaryArg", TestObjectPythonV8Internal::voidMethodSe
quenceDictionaryArgMethodCallback, 0, 1}, | 7532 {"voidMethodSequenceDictionaryArg", TestObjectPythonV8Internal::voidMethodSe
quenceDictionaryArgMethodCallback, 0, 1}, |
| 7513 {"voidMethodStringArgLongArg", TestObjectPythonV8Internal::voidMethodStringA
rgLongArgMethodCallback, 0, 2}, | 7533 {"voidMethodStringArgLongArg", TestObjectPythonV8Internal::voidMethodStringA
rgLongArgMethodCallback, 0, 2}, |
| 7514 {"voidMethodOptionalStringArg", TestObjectPythonV8Internal::voidMethodOption
alStringArgMethodCallback, 0, 0}, | 7534 {"voidMethodOptionalStringArg", TestObjectPythonV8Internal::voidMethodOption
alStringArgMethodCallback, 0, 0}, |
| 7515 {"voidMethodOptionalTestInterfaceEmptyArg", TestObjectPythonV8Internal::void
MethodOptionalTestInterfaceEmptyArgMethodCallback, 0, 0}, | 7535 {"voidMethodOptionalTestInterfaceEmptyArg", TestObjectPythonV8Internal::void
MethodOptionalTestInterfaceEmptyArgMethodCallback, 0, 0}, |
| 7516 {"voidMethodOptionalLongArg", TestObjectPythonV8Internal::voidMethodOptional
LongArgMethodCallback, 0, 0}, | 7536 {"voidMethodOptionalLongArg", TestObjectPythonV8Internal::voidMethodOptional
LongArgMethodCallback, 0, 0}, |
| 7517 {"stringMethodOptionalLongArg", TestObjectPythonV8Internal::stringMethodOpti
onalLongArgMethodCallback, 0, 0}, | 7537 {"stringMethodOptionalLongArg", TestObjectPythonV8Internal::stringMethodOpti
onalLongArgMethodCallback, 0, 0}, |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7757 fromInternalPointer(object)->deref(); | 7777 fromInternalPointer(object)->deref(); |
| 7758 } | 7778 } |
| 7759 | 7779 |
| 7760 template<> | 7780 template<> |
| 7761 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) | 7781 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) |
| 7762 { | 7782 { |
| 7763 return toV8(impl, creationContext, isolate); | 7783 return toV8(impl, creationContext, isolate); |
| 7764 } | 7784 } |
| 7765 | 7785 |
| 7766 } // namespace WebCore | 7786 } // namespace WebCore |
| OLD | NEW |