bindings: Retires [Custom=Wrap].

Since CSSValue.idl and its family were removed, we no longer need
to support [Custom=Wrap].

BUG=235436

Review URL: https://codereview.chromium.org/726553002

git-svn-id: svn://svn.chromium.org/blink/trunk@185292 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 06d5d579
...@@ -43,7 +43,7 @@ Constructor ...@@ -43,7 +43,7 @@ Constructor
# FIXME: remove [ConstructorCallWith=Document], as can instead use # FIXME: remove [ConstructorCallWith=Document], as can instead use
# [ConstructorCallWith=ExecutionContext] + toDocument(executionContext) # [ConstructorCallWith=ExecutionContext] + toDocument(executionContext)
ConstructorCallWith=ExecutionContext|Document ConstructorCallWith=ExecutionContext|Document
Custom=|Getter|Setter|LegacyCallAsFunction|ToV8|VisitDOMWrapper|Wrap|PropertyGetter|PropertyEnumerator|PropertyQuery Custom=|Getter|Setter|LegacyCallAsFunction|ToV8|VisitDOMWrapper|PropertyGetter|PropertyEnumerator|PropertyQuery
CustomConstructor CustomConstructor
CustomElementCallbacks CustomElementCallbacks
Default=Undefined Default=Undefined
......
...@@ -166,7 +166,7 @@ def interface_context(interface): ...@@ -166,7 +166,7 @@ def interface_context(interface):
# [NotScriptWrappable] # [NotScriptWrappable]
is_script_wrappable = 'NotScriptWrappable' not in extended_attributes is_script_wrappable = 'NotScriptWrappable' not in extended_attributes
# [Custom=Wrap], [SetWrapperReferenceFrom] # [SetWrapperReferenceFrom]
has_visit_dom_wrapper = ( has_visit_dom_wrapper = (
has_extended_attribute_value(interface, 'Custom', 'VisitDOMWrapper') or has_extended_attribute_value(interface, 'Custom', 'VisitDOMWrapper') or
reachable_node_function or reachable_node_function or
...@@ -192,7 +192,6 @@ def interface_context(interface): ...@@ -192,7 +192,6 @@ def interface_context(interface):
interface.name != 'EventTarget'), interface.name != 'EventTarget'),
'has_custom_legacy_call_as_function': has_extended_attribute_value(interface, 'Custom', 'LegacyCallAsFunction'), # [Custom=LegacyCallAsFunction] 'has_custom_legacy_call_as_function': has_extended_attribute_value(interface, 'Custom', 'LegacyCallAsFunction'), # [Custom=LegacyCallAsFunction]
'has_custom_to_v8': has_extended_attribute_value(interface, 'Custom', 'ToV8'), # [Custom=ToV8] 'has_custom_to_v8': has_extended_attribute_value(interface, 'Custom', 'ToV8'), # [Custom=ToV8]
'has_custom_wrap': has_extended_attribute_value(interface, 'Custom', 'Wrap'), # [Custom=Wrap]
'has_partial_interface': len(interface.partial_interfaces) > 0, 'has_partial_interface': len(interface.partial_interfaces) > 0,
'has_visit_dom_wrapper': has_visit_dom_wrapper, 'has_visit_dom_wrapper': has_visit_dom_wrapper,
'header_includes': header_includes, 'header_includes': header_includes,
......
...@@ -202,46 +202,6 @@ inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, {{cpp_class}} ...@@ -202,46 +202,6 @@ inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, {{cpp_class}}
v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate())); v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
} }
{% elif has_custom_wrap %}
v8::Handle<v8::Object> wrapCustom({{cpp_class}}* impl, v8::Handle<v8::Object> creationContext, v8::Isolate*);
inline v8::Handle<v8::Value> toV8({{cpp_class}}* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
if (UNLIKELY(!impl))
return v8::Null(isolate);
v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper(impl, isolate);
if (!wrapper.IsEmpty())
return wrapper;
return wrapCustom(impl, creationContext, isolate);
}
template<typename CallbackInfo>
inline void v8SetReturnValue(const CallbackInfo& callbackInfo, {{cpp_class}}* impl)
{
if (UNLIKELY(!impl)) {
v8SetReturnValueNull(callbackInfo);
return;
}
if (DOMDataStore::setReturnValue(callbackInfo.GetReturnValue(), impl))
return;
v8::Handle<v8::Object> wrapper = wrapCustom(impl, callbackInfo.Holder(), callbackInfo.GetIsolate());
v8SetReturnValue(callbackInfo, wrapper);
}
template<typename CallbackInfo>
inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, {{cpp_class}}* impl)
{
ASSERT(DOMWrapperWorld::current(callbackInfo.GetIsolate()).isMainWorld());
return v8SetReturnValue(callbackInfo, impl);
}
template<typename CallbackInfo, typename Wrappable>
inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, {{cpp_class}}* impl, Wrappable*)
{
return v8SetReturnValue(callbackInfo, impl);
}
{% elif not is_script_wrappable %} {% elif not is_script_wrappable %}
inline v8::Handle<v8::Value> toV8({{cpp_class}}* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) inline v8::Handle<v8::Value> toV8({{cpp_class}}* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{ {
......
...@@ -569,9 +569,6 @@ static void {{name}}(const v8::FunctionCallbackInfo<v8::Value>& info) ...@@ -569,9 +569,6 @@ static void {{name}}(const v8::FunctionCallbackInfo<v8::Value>& info)
{##############################################################################} {##############################################################################}
{% macro generate_constructor_wrapper(constructor) %} {% macro generate_constructor_wrapper(constructor) %}
{% if has_custom_wrap %}
v8::Handle<v8::Object> wrapper = wrapCustom(impl.get(), info.Holder(), info.GetIsolate());
{% else %}
{% set constructor_class = v8_class + ('Constructor' {% set constructor_class = v8_class + ('Constructor'
if constructor.is_named_constructor else if constructor.is_named_constructor else
'') %} '') %}
...@@ -581,7 +578,6 @@ impl->associateWithWrapper(&{{constructor_class}}::wrapperTypeInfo, wrapper, inf ...@@ -581,7 +578,6 @@ impl->associateWithWrapper(&{{constructor_class}}::wrapperTypeInfo, wrapper, inf
{% else %} {% else %}
V8DOMWrapper::associateObjectWithWrapper(info.GetIsolate(), impl.get(), &{{constructor_class}}::wrapperTypeInfo, wrapper); V8DOMWrapper::associateObjectWithWrapper(info.GetIsolate(), impl.get(), &{{constructor_class}}::wrapperTypeInfo, wrapper);
{% endif %} {% endif %}
{% endif %}
v8SetReturnValue(info, wrapper); v8SetReturnValue(info, wrapper);
{% endmacro %} {% endmacro %}
......
...@@ -34,8 +34,7 @@ ...@@ -34,8 +34,7 @@
// The more *minor* extended attribute should be put in this file. // The more *minor* extended attribute should be put in this file.
[ [
Constructor, // Test interaction with [Custom=Wrap] Constructor,
Custom=Wrap, // Conflicts with and [Custom=ToV8], respectively
DependentLifetime, // Covered by [ActiveDOMObject] DependentLifetime, // Covered by [ActiveDOMObject]
SetWrapperReferenceFrom=ownerNode, // Conflicts with [SetWrapperReferenceTo] SetWrapperReferenceFrom=ownerNode, // Conflicts with [SetWrapperReferenceTo]
] interface TestInterface2 { ] interface TestInterface2 {
......
...@@ -234,7 +234,8 @@ static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in ...@@ -234,7 +234,8 @@ static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
{ {
RefPtr<TestInterface2> impl = TestInterface2::create(); RefPtr<TestInterface2> impl = TestInterface2::create();
v8::Handle<v8::Object> wrapper = wrapCustom(impl.get(), info.Holder(), info.GetIsolate()); v8::Handle<v8::Object> wrapper = info.Holder();
impl->associateWithWrapper(&V8TestInterface2::wrapperTypeInfo, wrapper, info.GetIsolate());
v8SetReturnValue(info, wrapper); v8SetReturnValue(info, wrapper);
} }
......
...@@ -43,45 +43,6 @@ public: ...@@ -43,45 +43,6 @@ public:
static void installConditionallyEnabledMethods(v8::Handle<v8::Object>, v8::Isolate*) { } static void installConditionallyEnabledMethods(v8::Handle<v8::Object>, v8::Isolate*) { }
}; };
v8::Handle<v8::Object> wrapCustom(TestInterface2* impl, v8::Handle<v8::Object> creationContext, v8::Isolate*);
inline v8::Handle<v8::Value> toV8(TestInterface2* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
if (UNLIKELY(!impl))
return v8::Null(isolate);
v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper(impl, isolate);
if (!wrapper.IsEmpty())
return wrapper;
return wrapCustom(impl, creationContext, isolate);
}
template<typename CallbackInfo>
inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterface2* impl)
{
if (UNLIKELY(!impl)) {
v8SetReturnValueNull(callbackInfo);
return;
}
if (DOMDataStore::setReturnValue(callbackInfo.GetReturnValue(), impl))
return;
v8::Handle<v8::Object> wrapper = wrapCustom(impl, callbackInfo.Holder(), callbackInfo.GetIsolate());
v8SetReturnValue(callbackInfo, wrapper);
}
template<typename CallbackInfo>
inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestInterface2* impl)
{
ASSERT(DOMWrapperWorld::current(callbackInfo.GetIsolate()).isMainWorld());
return v8SetReturnValue(callbackInfo, impl);
}
template<typename CallbackInfo, typename Wrappable>
inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestInterface2* impl, Wrappable*)
{
return v8SetReturnValue(callbackInfo, impl);
}
} // namespace blink } // namespace blink
#endif // V8TestInterface2_h #endif // V8TestInterface2_h
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment