| 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 27 matching lines...) Expand all Loading... |
| 38 #include "V8TestObject.h" | 38 #include "V8TestObject.h" |
| 39 #include "bindings/tests/idls/testing/SupportTestPartialInterface.h" | 39 #include "bindings/tests/idls/testing/SupportTestPartialInterface.h" |
| 40 #include "bindings/v8/ExceptionMessages.h" | 40 #include "bindings/v8/ExceptionMessages.h" |
| 41 #include "bindings/v8/ExceptionState.h" | 41 #include "bindings/v8/ExceptionState.h" |
| 42 #include "bindings/v8/V8DOMConfiguration.h" | 42 #include "bindings/v8/V8DOMConfiguration.h" |
| 43 #include "core/dom/ContextFeatures.h" | 43 #include "core/dom/ContextFeatures.h" |
| 44 #include "core/dom/Document.h" | 44 #include "core/dom/Document.h" |
| 45 #include "platform/TraceEvent.h" | 45 #include "platform/TraceEvent.h" |
| 46 #include "wtf/GetPtr.h" | 46 #include "wtf/GetPtr.h" |
| 47 #include "wtf/RefPtr.h" | 47 #include "wtf/RefPtr.h" |
| 48 #include "wtf/UnusedParam.h" | |
| 49 | 48 |
| 50 namespace WebCore { | 49 namespace WebCore { |
| 51 | 50 |
| 52 static void initializeScriptWrappableForInterface(SupportTestInterface* object) | 51 static void initializeScriptWrappableForInterface(SupportTestInterface* object) |
| 53 { | 52 { |
| 54 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) | 53 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) |
| 55 ScriptWrappable::setTypeInfoInObject(object, &V8SupportTestInterface::wr
apperTypeInfo); | 54 ScriptWrappable::setTypeInfoInObject(object, &V8SupportTestInterface::wr
apperTypeInfo); |
| 56 else | 55 else |
| 57 ASSERT_NOT_REACHED(); | 56 ASSERT_NOT_REACHED(); |
| 58 } | 57 } |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 static v8::Handle<v8::FunctionTemplate> ConfigureV8SupportTestInterfaceTemplate(
v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, Wrapper
WorldType currentWorldType) | 397 static v8::Handle<v8::FunctionTemplate> ConfigureV8SupportTestInterfaceTemplate(
v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, Wrapper
WorldType currentWorldType) |
| 399 { | 398 { |
| 400 functionTemplate->ReadOnlyPrototype(); | 399 functionTemplate->ReadOnlyPrototype(); |
| 401 | 400 |
| 402 v8::Local<v8::Signature> defaultSignature; | 401 v8::Local<v8::Signature> defaultSignature; |
| 403 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl
ate, "SupportTestInterface", v8::Local<v8::FunctionTemplate>(), V8SupportTestInt
erface::internalFieldCount, | 402 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl
ate, "SupportTestInterface", v8::Local<v8::FunctionTemplate>(), V8SupportTestInt
erface::internalFieldCount, |
| 404 V8SupportTestInterfaceAttributes, WTF_ARRAY_LENGTH(V8SupportTestInterfac
eAttributes), | 403 V8SupportTestInterfaceAttributes, WTF_ARRAY_LENGTH(V8SupportTestInterfac
eAttributes), |
| 405 0, 0, | 404 0, 0, |
| 406 V8SupportTestInterfaceMethods, WTF_ARRAY_LENGTH(V8SupportTestInterfaceMe
thods), | 405 V8SupportTestInterfaceMethods, WTF_ARRAY_LENGTH(V8SupportTestInterfaceMe
thods), |
| 407 isolate, currentWorldType); | 406 isolate, currentWorldType); |
| 408 UNUSED_PARAM(defaultSignature); | 407 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTempla
te->InstanceTemplate(); |
| 409 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); | 408 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTempl
ate->PrototypeTemplate(); |
| 410 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); | |
| 411 UNUSED_PARAM(instanceTemplate); | |
| 412 UNUSED_PARAM(prototypeTemplate); | |
| 413 #if ENABLE(Condition11) || ENABLE(Condition12) | 409 #if ENABLE(Condition11) || ENABLE(Condition12) |
| 414 if (RuntimeEnabledFeatures::featureName13Enabled()) { | 410 if (RuntimeEnabledFeatures::featureName13Enabled()) { |
| 415 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ | 411 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ |
| 416 {"Node13", SupportTestInterfaceV8Internal::Node13AttributeGetterCallback
, SupportTestInterfaceV8Internal::Node13AttributeSetterCallback, 0, 0, 0, static
_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::No
ne), 0 /* on instance */}; | 412 {"Node13", SupportTestInterfaceV8Internal::Node13AttributeGetterCallback
, SupportTestInterfaceV8Internal::Node13AttributeSetterCallback, 0, 0, 0, static
_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::No
ne), 0 /* on instance */}; |
| 417 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate
, attributeConfiguration, isolate, currentWorldType); | 413 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate
, attributeConfiguration, isolate, currentWorldType); |
| 418 } | 414 } |
| 419 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 415 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| 420 static const V8DOMConfiguration::ConstantConfiguration V8SupportTestInterfac
eConstants[] = { | 416 static const V8DOMConfiguration::ConstantConfiguration V8SupportTestInterfac
eConstants[] = { |
| 421 {"SUPPLEMENTALCONSTANT1", 1}, | 417 {"SUPPLEMENTALCONSTANT1", 1}, |
| 422 {"SUPPLEMENTALCONSTANT2", 2}, | 418 {"SUPPLEMENTALCONSTANT2", 2}, |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 fromInternalPointer(object)->deref(); | 505 fromInternalPointer(object)->deref(); |
| 510 } | 506 } |
| 511 | 507 |
| 512 template<> | 508 template<> |
| 513 v8::Handle<v8::Value> toV8NoInline(SupportTestInterface* impl, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate* isolate) | 509 v8::Handle<v8::Value> toV8NoInline(SupportTestInterface* impl, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate* isolate) |
| 514 { | 510 { |
| 515 return toV8(impl, creationContext, isolate); | 511 return toV8(impl, creationContext, isolate); |
| 516 } | 512 } |
| 517 | 513 |
| 518 } // namespace WebCore | 514 } // namespace WebCore |
| OLD | NEW |