提交 74951dfc 编写于 作者: E Eric Seidel

Remove GarbageCollected support from the bindings

This was the last complicated piece of removing
platform/heap, the rest should be trivial to delete
after removing :trace overrides and mass-renaming
the various WillBe types to their old versions.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/683593002
上级 995c857c
......@@ -56,7 +56,6 @@ EnforceRange
EventConstructor
ExposeJSAccessors
Exposed=*
GarbageCollected
Global=|*
Immutable
ImplementedAs=*
......@@ -95,4 +94,3 @@ TreatUndefinedAs=NullString
TypeChecking=Interface|Unrestricted
URL
Unforgeable
WillBeGarbageCollected
......@@ -60,7 +60,6 @@ public:
static v8::Handle<v8::Object> associateObjectWithWrapperNonTemplate(Node*, const WrapperTypeInfo*, v8::Handle<v8::Object>, v8::Isolate*);
static void setNativeInfo(v8::Handle<v8::Object>, const WrapperTypeInfo*, ScriptWrappableBase* internalPointer);
static void setNativeInfoForHiddenWrapper(v8::Handle<v8::Object>, const WrapperTypeInfo*, ScriptWrappableBase* internalPointer);
static void setNativeInfoWithPersistentHandle(v8::Handle<v8::Object>, const WrapperTypeInfo*, ScriptWrappableBase* internalPointer, WrapperPersistentNode*);
static void clearNativeInfo(v8::Handle<v8::Object>, const WrapperTypeInfo*);
static bool isDOMWrapper(v8::Handle<v8::Value>);
......@@ -71,11 +70,6 @@ inline void V8DOMWrapper::setNativeInfo(v8::Handle<v8::Object> wrapper, const Wr
ASSERT(wrapper->InternalFieldCount() >= 2);
ASSERT(internalPointer);
ASSERT(wrapperTypeInfo);
#if ENABLE(OILPAN)
ASSERT(wrapperTypeInfo->gcType == WrapperTypeInfo::RefCountedObject);
#else
ASSERT(wrapperTypeInfo->gcType == WrapperTypeInfo::RefCountedObject || wrapperTypeInfo->gcType == WrapperTypeInfo::WillBeGarbageCollectedObject);
#endif
wrapper->SetAlignedPointerInInternalField(v8DOMWrapperObjectIndex, internalPointer);
wrapper->SetAlignedPointerInInternalField(v8DOMWrapperTypeIndex, const_cast<WrapperTypeInfo*>(wrapperTypeInfo));
}
......@@ -86,38 +80,8 @@ inline void V8DOMWrapper::setNativeInfoForHiddenWrapper(v8::Handle<v8::Object> w
ASSERT(wrapper->InternalFieldCount() >= 2);
ASSERT(internalPointer);
ASSERT(wrapperTypeInfo);
#if ENABLE(OILPAN)
ASSERT(wrapperTypeInfo->gcType != WrapperTypeInfo::RefCountedObject);
#else
ASSERT(wrapperTypeInfo->gcType == WrapperTypeInfo::RefCountedObject || wrapperTypeInfo->gcType == WrapperTypeInfo::WillBeGarbageCollectedObject);
#endif
// Clear out the last internal field, which is assumed to contain a valid persistent pointer value.
if (wrapperTypeInfo->gcType == WrapperTypeInfo::GarbageCollectedObject) {
wrapper->SetAlignedPointerInInternalField(wrapper->InternalFieldCount() - 1, 0);
} else if (wrapperTypeInfo->gcType == WrapperTypeInfo::WillBeGarbageCollectedObject) {
#if ENABLE(OILPAN)
wrapper->SetAlignedPointerInInternalField(wrapper->InternalFieldCount() - 1, 0);
#endif
}
wrapper->SetAlignedPointerInInternalField(v8DOMWrapperObjectIndex, internalPointer);
wrapper->SetAlignedPointerInInternalField(v8DOMWrapperTypeIndex, const_cast<WrapperTypeInfo*>(wrapperTypeInfo));
}
inline void V8DOMWrapper::setNativeInfoWithPersistentHandle(v8::Handle<v8::Object> wrapper, const WrapperTypeInfo* wrapperTypeInfo, ScriptWrappableBase* internalPointer, WrapperPersistentNode* handle)
{
ASSERT(wrapper->InternalFieldCount() >= 3);
ASSERT(internalPointer);
ASSERT(wrapperTypeInfo);
#if ENABLE(OILPAN)
ASSERT(wrapperTypeInfo->gcType == WrapperTypeInfo::WillBeGarbageCollectedObject || wrapperTypeInfo->gcType == WrapperTypeInfo::GarbageCollectedObject);
#else
ASSERT(wrapperTypeInfo->gcType == WrapperTypeInfo::GarbageCollectedObject);
#endif
wrapper->SetAlignedPointerInInternalField(v8DOMWrapperObjectIndex, internalPointer);
wrapper->SetAlignedPointerInInternalField(v8DOMWrapperTypeIndex, const_cast<WrapperTypeInfo*>(wrapperTypeInfo));
// Persistent handle is stored in the last internal field.
wrapper->SetAlignedPointerInInternalField(wrapper->InternalFieldCount() - 1, handle);
}
inline void V8DOMWrapper::clearNativeInfo(v8::Handle<v8::Object> wrapper, const WrapperTypeInfo* wrapperTypeInfo)
......@@ -125,7 +89,6 @@ inline void V8DOMWrapper::clearNativeInfo(v8::Handle<v8::Object> wrapper, const
ASSERT(wrapper->InternalFieldCount() >= 2);
ASSERT(wrapperTypeInfo);
// clearNativeInfo() is used only by NP objects, which are not garbage collected.
ASSERT(wrapperTypeInfo->gcType == WrapperTypeInfo::RefCountedObject);
wrapper->SetAlignedPointerInInternalField(v8DOMWrapperTypeIndex, const_cast<WrapperTypeInfo*>(wrapperTypeInfo));
wrapper->SetAlignedPointerInInternalField(v8DOMWrapperObjectIndex, 0);
}
......@@ -139,29 +102,10 @@ inline v8::Handle<v8::Object> V8DOMWrapper::associateObjectWithWrapper(PassRefPt
return wrapper;
}
template<typename V8T, typename T>
inline v8::Handle<v8::Object> V8DOMWrapper::associateObjectWithWrapper(T* object, const WrapperTypeInfo* wrapperTypeInfo, v8::Handle<v8::Object> wrapper, v8::Isolate* isolate)
{
setNativeInfoWithPersistentHandle(wrapper, wrapperTypeInfo, V8T::toScriptWrappableBase(object), new WrapperPersistent<T>(object));
ASSERT(isDOMWrapper(wrapper));
DOMDataStore::setWrapper<V8T>(object, wrapper, isolate, wrapperTypeInfo);
return wrapper;
}
inline v8::Handle<v8::Object> V8DOMWrapper::associateObjectWithWrapperNonTemplate(ScriptWrappable* impl, const WrapperTypeInfo* wrapperTypeInfo, v8::Handle<v8::Object> wrapper, v8::Isolate* isolate)
{
wrapperTypeInfo->refObject(impl->toScriptWrappableBase());
#if ENABLE(OILPAN)
if (wrapperTypeInfo->gcType == WrapperTypeInfo::RefCountedObject)
setNativeInfo(wrapper, wrapperTypeInfo, impl->toScriptWrappableBase());
else
setNativeInfoWithPersistentHandle(wrapper, wrapperTypeInfo, impl->toScriptWrappableBase(), wrapperTypeInfo->createPersistentHandle(impl));
#else
if (wrapperTypeInfo->gcType != WrapperTypeInfo::GarbageCollectedObject)
setNativeInfo(wrapper, wrapperTypeInfo, impl->toScriptWrappableBase());
else
setNativeInfoWithPersistentHandle(wrapper, wrapperTypeInfo, impl->toScriptWrappableBase(), wrapperTypeInfo->createPersistentHandle(impl));
#endif
setNativeInfo(wrapper, wrapperTypeInfo, impl->toScriptWrappableBase());
ASSERT(isDOMWrapper(wrapper));
DOMDataStore::setWrapperNonTemplate(impl, wrapper, isolate, wrapperTypeInfo);
return wrapper;
......@@ -170,17 +114,7 @@ inline v8::Handle<v8::Object> V8DOMWrapper::associateObjectWithWrapperNonTemplat
inline v8::Handle<v8::Object> V8DOMWrapper::associateObjectWithWrapperNonTemplate(Node* node, const WrapperTypeInfo* wrapperTypeInfo, v8::Handle<v8::Object> wrapper, v8::Isolate* isolate)
{
wrapperTypeInfo->refObject(ScriptWrappable::fromObject(node)->toScriptWrappableBase());
#if ENABLE(OILPAN)
if (wrapperTypeInfo->gcType == WrapperTypeInfo::RefCountedObject)
setNativeInfo(wrapper, wrapperTypeInfo, ScriptWrappable::fromObject(node)->toScriptWrappableBase());
else
setNativeInfoWithPersistentHandle(wrapper, wrapperTypeInfo, ScriptWrappable::fromObject(node)->toScriptWrappableBase(), wrapperTypeInfo->createPersistentHandle(ScriptWrappable::fromObject(node)));
#else
if (wrapperTypeInfo->gcType != WrapperTypeInfo::GarbageCollectedObject)
setNativeInfo(wrapper, wrapperTypeInfo, ScriptWrappable::fromObject(node)->toScriptWrappableBase());
else
setNativeInfoWithPersistentHandle(wrapper, wrapperTypeInfo, ScriptWrappable::fromObject(node)->toScriptWrappableBase(), wrapperTypeInfo->createPersistentHandle(ScriptWrappable::fromObject(node)));
#endif
setNativeInfo(wrapper, wrapperTypeInfo, ScriptWrappable::fromObject(node)->toScriptWrappableBase());
ASSERT(isDOMWrapper(wrapper));
DOMDataStore::setWrapperNonTemplate(node, wrapper, isolate, wrapperTypeInfo);
return wrapper;
......
......@@ -52,7 +52,6 @@ static const int v8PrototypeInternalFieldcount = 1;
typedef v8::Handle<v8::FunctionTemplate> (*DomTemplateFunction)(v8::Isolate*);
typedef void (*RefObjectFunction)(ScriptWrappableBase* internalPointer);
typedef void (*DerefObjectFunction)(ScriptWrappableBase* internalPointer);
typedef WrapperPersistentNode* (*CreatePersistentHandleFunction)(ScriptWrappableBase* internalPointer);
typedef ActiveDOMObject* (*ToActiveDOMObjectFunction)(v8::Handle<v8::Object>);
typedef EventTarget* (*ToEventTargetFunction)(v8::Handle<v8::Object>);
typedef void (*ResolveWrapperReachabilityFunction)(ScriptWrappableBase* internalPointer, const v8::Persistent<v8::Object>&, v8::Isolate*);
......@@ -83,12 +82,6 @@ struct WrapperTypeInfo {
Independent,
};
enum GCType {
GarbageCollectedObject,
WillBeGarbageCollectedObject,
RefCountedObject,
};
static const WrapperTypeInfo* unwrap(v8::Handle<v8::Value> typeInfoWrapper)
{
return reinterpret_cast<const WrapperTypeInfo*>(v8::External::Cast(*typeInfoWrapper)->Value());
......@@ -134,12 +127,6 @@ struct WrapperTypeInfo {
derefObjectFunction(internalPointer);
}
WrapperPersistentNode* createPersistentHandle(ScriptWrappableBase* internalPointer) const
{
ASSERT(createPersistentHandleFunction);
return createPersistentHandleFunction(internalPointer);
}
void installConditionallyEnabledMethods(v8::Handle<v8::Object> prototypeTemplate, v8::Isolate* isolate) const
{
if (installConditionallyEnabledMethodsFunction)
......@@ -180,7 +167,6 @@ struct WrapperTypeInfo {
const DomTemplateFunction domTemplateFunction;
const RefObjectFunction refObjectFunction;
const DerefObjectFunction derefObjectFunction;
const CreatePersistentHandleFunction createPersistentHandleFunction;
const ToActiveDOMObjectFunction toActiveDOMObjectFunction;
const ToEventTargetFunction toEventTargetFunction;
const ResolveWrapperReachabilityFunction visitDOMWrapperFunction;
......@@ -190,7 +176,6 @@ struct WrapperTypeInfo {
const WrapperTypePrototype wrapperTypePrototype;
const WrapperClassId wrapperClassId;
const Lifetime lifetime;
const GCType gcType;
};
COMPILE_ASSERT(offsetof(struct WrapperTypeInfo, ginEmbedder) == offsetof(struct gin::WrapperInfo, embedder), wrapper_type_info_compatible_to_gin);
......@@ -226,34 +211,11 @@ inline const WrapperTypeInfo* toWrapperTypeInfo(v8::Handle<v8::Object> wrapper)
return getInternalField<WrapperTypeInfo, v8DOMWrapperTypeIndex>(wrapper);
}
inline const WrapperPersistentNode* toPersistentHandle(const v8::Handle<v8::Object>& wrapper)
{
// Persistent handle is stored in the last internal field.
return static_cast<WrapperPersistentNode*>(wrapper->GetAlignedPointerFromInternalField(wrapper->InternalFieldCount() - 1));
}
inline void releaseObject(v8::Handle<v8::Object> wrapper)
{
const WrapperTypeInfo* typeInfo = toWrapperTypeInfo(wrapper);
if (typeInfo->gcType == WrapperTypeInfo::GarbageCollectedObject) {
const WrapperPersistentNode* handle = toPersistentHandle(wrapper);
// This will be null iff a wrapper for a hidden wrapper object,
// see V8DOMWrapper::setNativeInfoForHiddenWrapper().
delete handle;
} else if (typeInfo->gcType == WrapperTypeInfo::WillBeGarbageCollectedObject) {
#if ENABLE(OILPAN)
const WrapperPersistentNode* handle = toPersistentHandle(wrapper);
// This will be null iff a wrapper for a hidden wrapper object,
// see V8DOMWrapper::setNativeInfoForHiddenWrapper().
delete handle;
#else
ASSERT(typeInfo->derefObjectFunction);
typeInfo->derefObjectFunction(toScriptWrappableBase(wrapper));
#endif
} else {
ASSERT(typeInfo->derefObjectFunction);
typeInfo->derefObjectFunction(toScriptWrappableBase(wrapper));
}
ASSERT(typeInfo->derefObjectFunction);
typeInfo->derefObjectFunction(toScriptWrappableBase(wrapper));
}
} // namespace blink
......
......@@ -50,12 +50,10 @@ const WrapperTypeInfo V8ArrayBuffer::wrapperTypeInfo = {
0,
V8ArrayBuffer::refObject,
V8ArrayBuffer::derefObject,
V8ArrayBuffer::createPersistentHandle,
0, 0, 0, 0, 0, 0,
WrapperTypeInfo::WrapperTypeObjectPrototype,
WrapperTypeInfo::ObjectClassId,
WrapperTypeInfo::Independent,
WrapperTypeInfo::RefCountedObject
};
bool V8ArrayBuffer::hasInstance(v8::Handle<v8::Value> value, v8::Isolate*)
......@@ -73,12 +71,6 @@ void V8ArrayBuffer::derefObject(ScriptWrappableBase* internalPointer)
fromInternalPointer(internalPointer)->deref();
}
WrapperPersistentNode* V8ArrayBuffer::createPersistentHandle(ScriptWrappableBase* internalPointer)
{
ASSERT_NOT_REACHED();
return 0;
}
v8::Handle<v8::Object> V8ArrayBuffer::createWrapper(PassRefPtr<ArrayBuffer> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
ASSERT(impl.get());
......
......@@ -56,7 +56,6 @@ public:
static ArrayBuffer* toNativeWithTypeCheck(v8::Isolate*, v8::Handle<v8::Value>);
static void refObject(ScriptWrappableBase* internalPointer);
static void derefObject(ScriptWrappableBase* internalPointer);
static WrapperPersistentNode* createPersistentHandle(ScriptWrappableBase* internalPointer);
static const WrapperTypeInfo wrapperTypeInfo;
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount;
......
......@@ -56,7 +56,6 @@ public:
static TypedArray* toNativeWithTypeCheck(v8::Isolate*, v8::Handle<v8::Value>);
static void refObject(ScriptWrappableBase* internalPointer);
static void derefObject(ScriptWrappableBase* internalPointer);
static WrapperPersistentNode* createPersistentHandle(ScriptWrappableBase* internalPointer);
static const WrapperTypeInfo wrapperTypeInfo;
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount;
......@@ -189,12 +188,10 @@ const WrapperTypeInfo V8TypedArray<TypedArray>::wrapperTypeInfo = {
0,
V8TypedArray<TypedArray>::refObject,
V8TypedArray<TypedArray>::derefObject,
V8TypedArray<TypedArray>::createPersistentHandle,
0, 0, 0, 0, 0, 0,
WrapperTypeInfo::WrapperTypeObjectPrototype,
WrapperTypeInfo::ObjectClassId,
WrapperTypeInfo::Independent,
WrapperTypeInfo::RefCountedObject
};
template <typename TypedArray>
......@@ -209,13 +206,6 @@ void V8TypedArray<TypedArray>::derefObject(ScriptWrappableBase* internalPointer)
fromInternalPointer(internalPointer)->deref();
}
template <typename TypedArray>
WrapperPersistentNode* V8TypedArray<TypedArray>::createPersistentHandle(ScriptWrappableBase* internalPointer)
{
ASSERT_NOT_REACHED();
return 0;
}
} // namespace blink
#endif // V8TypedArrayCustom_h
......@@ -124,14 +124,6 @@ class CodeGeneratorBase(object):
(interface_name, interface_info['implemented_as'])
for interface_name, interface_info in interfaces_info.iteritems()
if interface_info['implemented_as']))
IdlType.set_garbage_collected_types(set(
interface_name
for interface_name, interface_info in interfaces_info.iteritems()
if 'GarbageCollected' in interface_info['inherited_extended_attributes']))
IdlType.set_will_be_garbage_collected_types(set(
interface_name
for interface_name, interface_info in interfaces_info.iteritems()
if 'WillBeGarbageCollected' in interface_info['inherited_extended_attributes']))
v8_types.set_component_dirs(dict(
(interface_name, interface_info['component_dir'])
for interface_name, interface_info in interfaces_info.iteritems()))
......
......@@ -86,9 +86,7 @@ from utilities import read_pickle_files, write_pickle_file
INHERITED_EXTENDED_ATTRIBUTES = set([
'ActiveDOMObject',
'DependentLifetime',
'GarbageCollected',
'NotScriptWrappable',
'WillBeGarbageCollected',
])
# Main variable (filled in and exported)
......
......@@ -44,9 +44,9 @@ import v8_attributes
from v8_globals import includes
import v8_methods
import v8_types
from v8_types import cpp_ptr_type, cpp_template_type
from v8_types import cpp_template_type
import v8_utilities
from v8_utilities import (capitalize, conditional_string, cpp_name, gc_type,
from v8_utilities import (capitalize, conditional_string, cpp_name,
has_extended_attribute_value, runtime_enabled_function_name,
extended_attribute_value_as_list)
......@@ -151,14 +151,11 @@ def interface_context(interface):
reachable_node_function or
set_wrapper_reference_to_list)
this_gc_type = gc_type(interface)
wrapper_class_id = ('NodeClassId' if inherits_interface(interface.name, 'Node') else 'ObjectClassId')
context = {
'conditional_string': conditional_string(interface), # [Conditional]
'cpp_class': cpp_name(interface),
'gc_type': this_gc_type,
# FIXME: Remove 'EventTarget' special handling, http://crbug.com/383699
'has_access_check_callbacks': (is_check_security and
interface.name != 'Window' and
......@@ -186,7 +183,7 @@ def interface_context(interface):
'measure_as': v8_utilities.measure_as(interface), # [MeasureAs]
'parent_interface': parent_interface,
'pass_cpp_type': cpp_template_type(
cpp_ptr_type('PassRefPtr', 'RawPtr', this_gc_type),
'PassRefPtr',
cpp_name(interface)),
'reachable_node_function': reachable_node_function,
'runtime_enabled_function': runtime_enabled_function_name(interface), # [RuntimeEnabled]
......@@ -893,7 +890,7 @@ def constructor_context(interface, constructor):
for index, argument in enumerate(constructor.arguments)],
'arguments_need_try_catch': arguments_need_try_catch,
'cpp_type': cpp_template_type(
cpp_ptr_type('RefPtr', 'RawPtr', gc_type(interface)),
'RefPtr',
cpp_name(interface)),
'cpp_value': v8_methods.cpp_value(
interface, constructor, len(constructor.arguments)),
......
......@@ -259,7 +259,7 @@ def argument_context(interface, method, argument, index):
'v8_set_return_value': v8_set_return_value(interface.name, method, this_cpp_value),
'v8_set_return_value_for_main_world': v8_set_return_value(interface.name, method, this_cpp_value, for_main_world=True),
'v8_value_to_local_cpp_value': v8_value_to_local_cpp_value(argument, index, return_promise=return_promise),
'vector_type': v8_types.cpp_ptr_type('Vector', 'HeapVector', idl_type.gc_type),
'vector_type': 'Vector',
}
......
......@@ -151,7 +151,7 @@ def cpp_type(idl_type, extended_attributes=None, raw_type=False, used_as_rvalue_
else:
native_array_element_type = idl_type.native_array_element_type
if native_array_element_type:
vector_type = cpp_ptr_type('Vector', 'HeapVector', native_array_element_type.gc_type)
vector_type = 'Vector'
vector_template_type = cpp_template_type(vector_type, native_array_element_type.cpp_type_args(used_in_cpp_sequence=True))
if used_as_rvalue_type:
return 'const %s&' % vector_template_type
......@@ -183,7 +183,7 @@ def cpp_type(idl_type, extended_attributes=None, raw_type=False, used_as_rvalue_
if raw_type:
return implemented_as_class + '*'
new_type = 'Member' if used_in_cpp_sequence else 'RawPtr'
ptr_type = cpp_ptr_type(('PassRefPtr' if used_as_rvalue_type else 'RefPtr'), new_type, idl_type.gc_type)
ptr_type = ('PassRefPtr' if used_as_rvalue_type else 'RefPtr')
return cpp_template_type(ptr_type, implemented_as_class)
# Default, assume native type is a pointer with same type name as idl type
return base_idl_type + '*'
......@@ -245,16 +245,6 @@ def cpp_template_type(template, inner_type):
return format_string.format(template=template, inner_type=inner_type)
def cpp_ptr_type(old_type, new_type, gc_type):
if gc_type == 'GarbageCollectedObject':
return new_type
if gc_type == 'WillBeGarbageCollectedObject':
if old_type == 'Vector':
return 'WillBe' + new_type
return old_type + 'WillBe' + new_type
return old_type
def v8_type(interface_name):
return 'V8' + interface_name
......@@ -284,38 +274,6 @@ IdlType.set_implemented_as_interfaces = classmethod(
cls.implemented_as_interfaces.update(new_implemented_as_interfaces))
# [GarbageCollected]
IdlType.garbage_collected_types = set()
IdlType.is_garbage_collected = property(
lambda self: self.base_type in IdlType.garbage_collected_types)
IdlType.set_garbage_collected_types = classmethod(
lambda cls, new_garbage_collected_types:
cls.garbage_collected_types.update(new_garbage_collected_types))
# [WillBeGarbageCollected]
IdlType.will_be_garbage_collected_types = set()
IdlType.is_will_be_garbage_collected = property(
lambda self: self.base_type in IdlType.will_be_garbage_collected_types)
IdlType.set_will_be_garbage_collected_types = classmethod(
lambda cls, new_will_be_garbage_collected_types:
cls.will_be_garbage_collected_types.update(new_will_be_garbage_collected_types))
def gc_type(idl_type):
if idl_type.is_garbage_collected:
return 'GarbageCollectedObject'
if idl_type.is_will_be_garbage_collected:
return 'WillBeGarbageCollectedObject'
return 'RefCountedObject'
IdlTypeBase.gc_type = property(gc_type)
################################################################################
# Includes
################################################################################
......@@ -507,7 +465,7 @@ def v8_value_to_cpp_value_array_or_sequence(native_array_element_type, v8_value,
if (native_array_element_type.is_interface_type and
native_array_element_type.name != 'Dictionary'):
this_cpp_type = None
ref_ptr_type = cpp_ptr_type('RefPtr', 'Member', native_array_element_type.gc_type)
ref_ptr_type = 'RefPtr'
expression_format = '(to{ref_ptr_type}NativeArray<{native_array_element_type}, V8{native_array_element_type}>({v8_value}, {index}, {isolate}))'
add_includes_for_type(native_array_element_type)
else:
......
......@@ -269,16 +269,6 @@ def expanded_exposure_set_for_interface(interface):
return sorted(set(exposure_set))
# [GarbageCollected], [WillBeGarbageCollected]
def gc_type(definition):
extended_attributes = definition.extended_attributes
if 'GarbageCollected' in extended_attributes:
return 'GarbageCollectedObject'
elif 'WillBeGarbageCollected' in extended_attributes:
return 'WillBeGarbageCollectedObject'
return 'RefCountedObject'
# [ImplementedAs]
def cpp_name(definition_or_member):
extended_attributes = definition_or_member.extended_attributes
......
......@@ -497,7 +497,7 @@ static void {{cpp_class}}OriginSafeMethodSetterCallback(v8::Local<v8::String> na
if is_active_dom_object else '0' %}
{% set to_event_target = '%s::toEventTarget' % v8_class
if is_event_target else '0' %}
const WrapperTypeInfo {{v8_class}}Constructor::wrapperTypeInfo = { gin::kEmbedderBlink, {{v8_class}}Constructor::domTemplate, {{v8_class}}::refObject, {{v8_class}}::derefObject, {{v8_class}}::createPersistentHandle, {{to_active_dom_object}}, {{to_event_target}}, 0, {{v8_class}}::installConditionallyEnabledMethods, {{v8_class}}::installConditionallyEnabledProperties, 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::{{wrapper_class_id}}, WrapperTypeInfo::{{lifetime}}, WrapperTypeInfo::{{gc_type}} };
const WrapperTypeInfo {{v8_class}}Constructor::wrapperTypeInfo = { gin::kEmbedderBlink, {{v8_class}}Constructor::domTemplate, {{v8_class}}::refObject, {{v8_class}}::derefObject, {{to_active_dom_object}}, {{to_event_target}}, 0, {{v8_class}}::installConditionallyEnabledMethods, {{v8_class}}::installConditionallyEnabledProperties, 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::{{wrapper_class_id}}, WrapperTypeInfo::{{lifetime}} };
{{generate_constructor(named_constructor)}}
v8::Handle<v8::FunctionTemplate> {{v8_class}}Constructor::domTemplate(v8::Isolate* isolate)
......@@ -1208,41 +1208,12 @@ v8::Handle<v8::Object> {{v8_class}}::createWrapper({{pass_cpp_type}} impl, v8::H
void {{v8_class}}::refObject(ScriptWrappableBase* internalPointer)
{
{% if gc_type == 'WillBeGarbageCollectedObject' %}
#if !ENABLE(OILPAN)
fromInternalPointer(internalPointer)->ref();
#endif
{% elif gc_type == 'RefCountedObject' %}
fromInternalPointer(internalPointer)->ref();
{% endif %}
}
void {{v8_class}}::derefObject(ScriptWrappableBase* internalPointer)
{
{% if gc_type == 'WillBeGarbageCollectedObject' %}
#if !ENABLE(OILPAN)
fromInternalPointer(internalPointer)->deref();
#endif
{% elif gc_type == 'RefCountedObject' %}
fromInternalPointer(internalPointer)->deref();
{% endif %}
}
WrapperPersistentNode* {{v8_class}}::createPersistentHandle(ScriptWrappableBase* internalPointer)
{
{% if gc_type == 'GarbageCollectedObject' %}
return new WrapperPersistent<{{cpp_class}}>(fromInternalPointer(internalPointer));
{% elif gc_type == 'WillBeGarbageCollectedObject' %}
#if ENABLE(OILPAN)
return new WrapperPersistent<{{cpp_class}}>(fromInternalPointer(internalPointer));
#else
ASSERT_NOT_REACHED();
return 0;
#endif
{% elif gc_type == 'RefCountedObject' %}
ASSERT_NOT_REACHED();
return 0;
{% endif %}
}
template<>
......
......@@ -53,7 +53,6 @@ public:
static const WrapperTypeInfo wrapperTypeInfo;
static void refObject(ScriptWrappableBase* internalPointer);
static void derefObject(ScriptWrappableBase* internalPointer);
static WrapperPersistentNode* createPersistentHandle(ScriptWrappableBase* internalPointer);
{% if has_visit_dom_wrapper %}
static void visitDOMWrapper(ScriptWrappableBase* internalPointer, const v8::Persistent<v8::Object>&, v8::Isolate*);
{% endif %}
......@@ -134,19 +133,7 @@ public:
FIXME: Remove this internal field, and share one field for either:
* a persistent handle (if the object is in oilpan) or
* a C++ pointer to the DOM object (if the object is not in oilpan) #}
{% if gc_type == 'GarbageCollectedObject' %}
static const int persistentHandleIndex = v8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}};
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}} + 1;
{% elif gc_type == 'WillBeGarbageCollectedObject' %}
#if ENABLE(OILPAN)
static const int persistentHandleIndex = v8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}};
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}} + 1;
#else
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}};
#endif
{% elif gc_type == 'RefCountedObject' %}
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}};
{% endif %}
{# End custom internal fields #}
static inline ScriptWrappableBase* toScriptWrappableBase({{cpp_class}}* impl)
{
......
......@@ -24,7 +24,7 @@ namespace blink {
{% set wrapper_type_prototype = 'WrapperTypeExceptionPrototype' if is_exception else
'WrapperTypeObjectPrototype' %}
const WrapperTypeInfo {{v8_class}}::wrapperTypeInfo = { gin::kEmbedderBlink, {{v8_class}}::domTemplate, {{v8_class}}::refObject, {{v8_class}}::derefObject, {{v8_class}}::createPersistentHandle, {{to_active_dom_object}}, {{to_event_target}}, {{visit_dom_wrapper}}, {{v8_class}}::installConditionallyEnabledMethods, {{v8_class}}::installConditionallyEnabledProperties, {{parent_wrapper_type_info}}, WrapperTypeInfo::{{wrapper_type_prototype}}, WrapperTypeInfo::{{wrapper_class_id}}, WrapperTypeInfo::{{lifetime}}, WrapperTypeInfo::{{gc_type}} };
const WrapperTypeInfo {{v8_class}}::wrapperTypeInfo = { gin::kEmbedderBlink, {{v8_class}}::domTemplate, {{v8_class}}::refObject, {{v8_class}}::derefObject, {{to_active_dom_object}}, {{to_event_target}}, {{visit_dom_wrapper}}, {{v8_class}}::installConditionallyEnabledMethods, {{v8_class}}::installConditionallyEnabledProperties, {{parent_wrapper_type_info}}, WrapperTypeInfo::{{wrapper_type_prototype}}, WrapperTypeInfo::{{wrapper_class_id}}, WrapperTypeInfo::{{lifetime}} };
{% if is_script_wrappable %}
// This static member must be declared by DEFINE_WRAPPERTYPEINFO in {{cpp_class}}.h.
......
......@@ -36,7 +36,4 @@ callback interface TestCallbackInterface {
void voidMethodTestInterfaceEmptyStringArg(TestInterfaceEmpty testInterfaceEmptyArg, DOMString stringArg);
[CallWith=ThisValue] void callbackWithThisValueVoidMethodStringArg(DOMString stringArg);
[Custom] void customVoidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyArg);
// [WillBeGarbageCollected]
void voidMethodWillBeGarbageCollectedSequenceArg(sequence<TestInterfaceWillBeGarbageCollected> sequenceArg);
void voidMethodWillBeGarbageCollectedArrayArg(TestInterfaceWillBeGarbageCollected[] arrayArg);
};
......@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
[
GarbageCollected,
] dictionary TestDictionary {
boolean booleanMember;
long longMember = 1;
......@@ -11,10 +10,6 @@
double? doubleOrNullMember = null;
DOMString? stringOrNullMember = "default string value";
TestInterface? testInterfaceOrNullMember;
TestInterfaceGarbageCollected testInterfaceGarbageCollectedMember;
TestInterfaceGarbageCollected? testInterfaceGarbageCollectedOrNullMember;
TestInterfaceWillBeGarbageCollected testInterfaceWillBeGarbageCollectedMember;
TestInterfaceWillBeGarbageCollected? testInterfaceWillBeGarbageCollectedOrNullMember;
DOMString[] stringArrayMember;
sequence<DOMString> stringSequenceMember;
};
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
[
Constructor(DOMString str),
GarbageCollected,
] interface TestInterfaceGarbageCollected : EventTarget { // Inherit from EventTarget to test order of internal fields
attribute TestInterfaceGarbageCollected attr1;
void func(TestInterfaceGarbageCollected arg);
};
/*
* Copyright (C) 2014 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
[
Constructor(DOMString str),
NamedConstructor=TestInterface(DOMString str),
WillBeGarbageCollected,
] interface TestInterfaceWillBeGarbageCollected : EventTarget { // Inherit from EventTarget to test order of internal fields
attribute TestInterfaceWillBeGarbageCollected attr1;
void func(TestInterfaceWillBeGarbageCollected arg);
};
......@@ -186,8 +186,6 @@ interface TestObject {
[PutForwards=hrefByteString] readonly attribute TestNode locationByteString;
[PerWorldBindings, PutForwards=href] readonly attribute TestNode locationWithPerWorldBindings;
[TypeChecking=Interface, PutForwards=href] readonly attribute TestNode locationTypeCheckingInterface;
[PutForwards=attr1] readonly attribute TestInterfaceGarbageCollected locationGarbageCollected;
[PutForwards=attr1] readonly attribute TestInterfaceWillBeGarbageCollected locationWillBeGarbageCollected;
[RaisesException] attribute long raisesExceptionLongAttribute;
[RaisesException=Getter] attribute long raisesExceptionGetterLongAttribute;
[RaisesException=Setter] attribute long setterRaisesExceptionLongAttribute;
......@@ -337,8 +335,6 @@ interface TestObject {
TestInterface? nullableTestInterfaceMethod();
sequence<long>? nullableLongSequenceMethod();
// Union types
(TestInterfaceGarbageCollected or DOMString) testInterfaceGarbageCollectedOrDOMStringMethod();
(TestInterfaceWillBeGarbageCollected or TestDictionary) testInterfaceWillBeGarbageCollectedOrTestDictionaryMethod();
(sequence<long> or DOMString[] or unrestricted double) longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethod();
// Currently only used on interface type arguments
void voidMethodTestInterfaceEmptyOrNullArg(TestInterfaceEmpty? nullableTestInterfaceEmptyArg);
......@@ -395,8 +391,6 @@ interface TestObject {
void voidMethodStringArgVariadicStringArg(DOMString stringArg, DOMString... variadicStringArgs);
void voidMethodVariadicTestInterfaceEmptyArg(TestInterfaceEmpty... variadicTestInterfaceEmptyArgs);
void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyArg, TestInterfaceEmpty... variadicTestInterfaceEmptyArgs);
void voidMethodVariadicTestInterfaceGarbageCollectedArg(TestInterfaceGarbageCollected... variadicTestInterfaceGarbageCollectedArg);
void voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg(TestInterfaceWillBeGarbageCollected... variadicTestInterfaceWillBeGarbageCollectedArg);
// Overloaded methods
void overloadedMethodA(long longArg);
......@@ -502,18 +496,10 @@ interface TestObject {
[TypeChecking=Interface] void typeCheckingInterfaceVoidMethodTestInterfaceEmptyVariadicArg(TestInterfaceEmpty... testInterfaceEmptyArg);
[TypeChecking=Unrestricted] void typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg(float floatArg, double doubleArg);
[Unforgeable] void unforgeableVoidMethod();
void voidMethodTestInterfaceGarbageCollectedSequenceArg(sequence<TestInterfaceGarbageCollected> testInterfaceGarbageCollectedSequenceArg);
void voidMethodTestInterfaceGarbageCollectedArrayArg(TestInterfaceGarbageCollected[] testInterfaceGarbageCollectedArrayArg);
void voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg(sequence<TestInterfaceWillBeGarbageCollected> testInterfaceWillBeGarbageCollectedSequenceArg);
void voidMethodTestInterfaceWillBeGarbageCollectedArrayArg(TestInterfaceWillBeGarbageCollected[] testInterfaceWillBeGarbageCollectedArrayArg);
// Extended attributes on referenced interfaces
// (not self; self-reference tests at interface themselves)
attribute TestInterface testInterfaceAttribute; // [ImplementedAs]
attribute TestInterfaceGarbageCollected testInterfaceGarbageCollectedAttribute; // [GarbageCollected]
attribute TestInterfaceGarbageCollected? testInterfaceGarbageCollectedOrNullAttribute; // [GarbageCollected]
attribute TestInterfaceWillBeGarbageCollected testInterfaceWillBeGarbageCollectedAttribute; // [WillBeGarbageCollected]
attribute TestInterfaceWillBeGarbageCollected? testInterfaceWillBeGarbageCollectedOrNullAttribute; // [WillBeGarbageCollected]
// Private scripts
[ImplementedInPrivateScript] void voidMethodImplementedInPrivateScript();
......
......@@ -5,6 +5,5 @@
[
RuntimeEnabled=WebAnimationsAPI,
NoInterfaceObject,
WillBeGarbageCollected
] interface AnimationEffect {
};
......@@ -30,7 +30,6 @@
[
RuntimeEnabled=WebAnimationsAPI,
WillBeGarbageCollected,
] interface AnimationNode {
// Playback state
readonly attribute double? localTime;
......
......@@ -30,7 +30,6 @@
[
NoInterfaceObject,
WillBeGarbageCollected,
ActiveDOMObject,
] interface AnimationPlayer : EventTarget {
[RuntimeEnabled=WebAnimationsAPI] attribute AnimationNode? source;
......
......@@ -4,7 +4,6 @@
[
RuntimeEnabled=WebAnimationsAPI,
WillBeGarbageCollected,
] interface AnimationTimeline {
readonly attribute double? currentTime;
AnimationPlayer play(AnimationNode source);
......
......@@ -5,7 +5,6 @@
[
RuntimeEnabled=WebAnimationsAPI,
ImplementedAs=AnimationNodeTiming,
WillBeGarbageCollected,
] interface Timing {
attribute double delay;
attribute double endDelay;
......
......@@ -30,7 +30,6 @@
[
NoInterfaceObject,
ImplementedAs=DOMWindowCSS,
WillBeGarbageCollected
] interface CSS {
boolean supports(DOMString property, DOMString value);
boolean supports(DOMString conditionText);
......
......@@ -28,7 +28,6 @@
Constructor(optional DOMString cssValue = null),
ImplementedAs=CSSMatrix,
RaisesException=Constructor,
WillBeGarbageCollected
] interface CSSMatrix {
// These attributes are simple aliases for certain elements of the 4x4 matrix
......
......@@ -23,7 +23,6 @@
Custom=Wrap,
DependentLifetime,
NotScriptWrappable,
WillBeGarbageCollected,
] interface CSSRule {
// RuleType
......
......@@ -26,7 +26,6 @@
// Introduced in DOM Level 2:
[
DependentLifetime,
WillBeGarbageCollected,
] interface CSSRuleList {
readonly attribute unsigned long length;
getter CSSRule item(unsigned long index);
......
......@@ -21,7 +21,6 @@
// Introduced in DOM Level 2:
[
DependentLifetime,
WillBeGarbageCollected
] interface CSSStyleDeclaration {
[RaisesException=Setter] attribute DOMString? cssText;
......
......@@ -22,7 +22,6 @@
Custom=Wrap,
DependentLifetime,
NotScriptWrappable,
WillBeGarbageCollected,
] interface CSSValue {
// UnitTypes
......
......@@ -43,7 +43,6 @@ enum FontFaceLoadStatus {
Constructor(DOMString family, ArrayBuffer source, optional Dictionary descriptors),
Constructor(DOMString family, ArrayBufferView source, optional Dictionary descriptors),
ConstructorCallWith=ExecutionContext,
WillBeGarbageCollected,
] interface FontFace {
[RaisesException=Setter, SetterCallWith=ExecutionContext] attribute DOMString family;
......
......@@ -25,7 +25,6 @@
// Introduced in DOM Level 2:
[
WillBeGarbageCollected
] interface MediaList {
attribute DOMString? mediaText;
......
......@@ -21,7 +21,6 @@
[
ActiveDOMObject,
NoInterfaceObject,
WillBeGarbageCollected
] interface MediaQueryList : EventTarget {
readonly attribute DOMString media;
readonly attribute boolean matches;
......
......@@ -20,7 +20,6 @@
[
NotScriptWrappable,
WillBeGarbageCollected
] interface RGBColor {
readonly attribute CSSPrimitiveValue red;
readonly attribute CSSPrimitiveValue green;
......
......@@ -19,7 +19,6 @@
[
NotScriptWrappable,
WillBeGarbageCollected
] interface Rect {
readonly attribute CSSPrimitiveValue top;
readonly attribute CSSPrimitiveValue right;
......
......@@ -26,7 +26,6 @@
[
NoInterfaceObject,
WillBeGarbageCollected
] interface StyleMedia {
readonly attribute DOMString type;
boolean matchMedium([Default=Undefined] optional DOMString mediaquery);
......
......@@ -22,7 +22,6 @@
[
Custom=Wrap,
SetWrapperReferenceFrom=ownerNode,
WillBeGarbageCollected
] interface StyleSheet {
readonly attribute DOMString? type;
readonly attribute Node ownerNode;
......
......@@ -21,7 +21,6 @@
// Introduced in DOM Level 2:
[
SetWrapperReferenceFrom=document,
WillBeGarbageCollected
] interface StyleSheetList {
readonly attribute unsigned long length;
getter StyleSheet item(unsigned long index);
......
......@@ -25,7 +25,6 @@
*/
[
WillBeGarbageCollected,
] interface ClientRect {
readonly attribute float top;
readonly attribute float right;
......
......@@ -25,7 +25,6 @@
*/
[
WillBeGarbageCollected,
] interface ClientRectList {
readonly attribute unsigned long length;
getter ClientRect item(unsigned long index);
......
......@@ -27,7 +27,6 @@
*/
[
Constructor(DOMString name, optional DOMString message = null),
WillBeGarbageCollected
] interface DOMError {
readonly attribute DOMString name;
readonly attribute DOMString message;
......
......@@ -28,7 +28,6 @@
[
DoNotCheckConstants,
WillBeGarbageCollected,
] exception DOMException {
readonly attribute unsigned short code;
......
......@@ -20,7 +20,6 @@
[
SetWrapperReferenceFrom=document,
WillBeGarbageCollected,
] interface DOMImplementation {
Document createDocument();
};
......@@ -24,7 +24,6 @@
*/
[
WillBeGarbageCollected,
] interface DOMStringList {
readonly attribute unsigned long length;
[TreatReturnedNullStringAs=Null] getter DOMString item([Default=Undefined] optional unsigned long index);
......
......@@ -24,7 +24,6 @@
[
SetWrapperReferenceFrom=element,
WillBeGarbageCollected,
] interface DOMTokenList {
readonly attribute unsigned long length;
[TreatReturnedNullStringAs=Null] getter DOMString item(unsigned long index);
......
......@@ -31,7 +31,6 @@
[
CustomConstructor(MutationCallback callback),
Custom=VisitDOMWrapper,
WillBeGarbageCollected,
] interface MutationObserver {
[RaisesException] void observe(Node target, Dictionary options);
sequence<MutationRecord> takeRecords();
......
......@@ -29,7 +29,6 @@
*/
[
WillBeGarbageCollected,
] interface MutationRecord {
readonly attribute DOMString type;
readonly attribute Node target;
......
......@@ -20,7 +20,6 @@
[
SetWrapperReferenceFrom=element,
WillBeGarbageCollected,
] interface NamedNodeMap {
[NotEnumerable, ImplementedAs=getNamedItem] getter Attr ([Default=Undefined] optional DOMString name);
getter Attr item([Default=Undefined] optional unsigned long index);
......
......@@ -21,7 +21,6 @@
[
DependentLifetime,
SetWrapperReferenceFrom=virtualOwnerNode,
WillBeGarbageCollected,
] interface NodeList {
getter Node item(unsigned long index);
readonly attribute unsigned long length;
......
......@@ -22,7 +22,6 @@
[
Constructor,
ConstructorCallWith=Document,
WillBeGarbageCollected,
] interface Range {
readonly attribute Node startContainer;
......
......@@ -24,7 +24,6 @@
*/
[
WillBeGarbageCollected,
] interface Touch {
readonly attribute double clientX;
readonly attribute double clientY;
......
......@@ -24,7 +24,6 @@
*/
[
WillBeGarbageCollected,
] interface TouchList {
readonly attribute unsigned long length;
......
......@@ -32,7 +32,6 @@
Constructor(ScalarValueString url, URL base),
ImplementedAs=DOMURL,
RaisesException=Constructor,
WillBeGarbageCollected,
] interface URL {
};
......
......@@ -37,7 +37,6 @@
// http://crbug.com/391673
[
ImplementedAs=DOMSelection,
WillBeGarbageCollected,
] interface Selection {
readonly attribute Node anchorNode;
readonly attribute long anchorOffset;
......
......@@ -20,7 +20,6 @@
// Introduced in DOM Level 2:
[
WillBeGarbageCollected,
Custom=Wrap,
EventConstructor,
] interface Event {
......
......@@ -21,7 +21,6 @@
[
CheckSecurity=Window,
Custom=ToV8,
WillBeGarbageCollected,
] interface EventTarget {
// FIXME: first 2 args should be required, but throwing TypeError breaks
// legacy content. http://crbug.com/353484
......
......@@ -29,7 +29,6 @@
[
NoInterfaceObject,
WillBeGarbageCollected,
] interface ConsoleBase {
[CallWith=(ScriptArguments,ScriptState)] void debug();
[CallWith=(ScriptArguments,ScriptState)] void error();
......
......@@ -24,7 +24,6 @@
*/
[
WillBeGarbageCollected,
] interface History {
readonly attribute unsigned long length;
[Custom=Getter] readonly attribute SerializedScriptValue state;
......
......@@ -3,7 +3,6 @@
// found in the LICENSE file.
[
WillBeGarbageCollected,
] interface ImageBitmap {
readonly attribute long width;
readonly attribute long height;
......
......@@ -28,7 +28,6 @@
[
CheckSecurity=Frame,
WillBeGarbageCollected,
] interface Location {
// |assign|, |replace|, and *writing* |href| do not require a security
// check, as they *change* the page, and thus these do not change any
......
......@@ -28,7 +28,6 @@
[
WillBeGarbageCollected,
] interface Screen {
readonly attribute unsigned long height;
readonly attribute unsigned long width;
......
......@@ -32,7 +32,6 @@
Custom=ToV8,
ImplementedAs=LocalDOMWindow,
PrimaryGlobal,
WillBeGarbageCollected,
] interface Window : EventTarget {
readonly attribute Screen screen;
readonly attribute History history;
......
......@@ -33,7 +33,6 @@
Constructor(Uint8ClampedArray data, unsigned long width, [Default=Undefined] optional unsigned long height),
Custom=Wrap,
RaisesException=Constructor,
WillBeGarbageCollected,
] interface ImageData {
readonly attribute long width;
readonly attribute long height;
......
......@@ -25,7 +25,6 @@
[
RuntimeEnabled=Media,
WillBeGarbageCollected,
] interface MediaError {
const unsigned short MEDIA_ERR_ABORTED = 1;
const unsigned short MEDIA_ERR_NETWORK = 2;
......
......@@ -25,7 +25,6 @@
[
RuntimeEnabled=EncryptedMediaAnyVersion,
WillBeGarbageCollected,
] interface MediaKeyError {
const unsigned short MEDIA_KEYERR_UNKNOWN = 1;
const unsigned short MEDIA_KEYERR_CLIENT = 2;
......
......@@ -23,7 +23,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
[
WillBeGarbageCollected,
] interface TextMetrics {
// x-direction
readonly attribute float width;
......
......@@ -24,7 +24,6 @@
*/
[
WillBeGarbageCollected,
RuntimeEnabled=Media
] interface TimeRanges {
readonly attribute unsigned long length;
......
......@@ -32,7 +32,6 @@
DoNotCheckConstants,
NoInterfaceObject,
TypeChecking=Interface,
WillBeGarbageCollected,
] interface ANGLEInstancedArrays {
const unsigned long VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE;
......
......@@ -26,7 +26,6 @@
[
NoInterfaceObject,
WillBeGarbageCollected,
] interface Canvas2DContextAttributes {
attribute boolean alpha;
[RuntimeEnabled=ExperimentalCanvasFeatures] attribute DOMString storage;
......
......@@ -25,7 +25,6 @@
*/
[
TypeChecking=Unrestricted,
WillBeGarbageCollected,
] interface CanvasGradient {
[RaisesException] void addColorStop(float offset, DOMString color);
......
......@@ -23,6 +23,5 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
[
WillBeGarbageCollected,
] interface CanvasPattern {
};
......@@ -39,7 +39,6 @@ enum CanvasFillRule { "nonzero", "evenodd" };
[
TypeChecking=(Interface,Unrestricted),
WillBeGarbageCollected,
] interface CanvasRenderingContext2D {
// back-reference to the canvas
readonly attribute HTMLCanvasElement canvas;
......
......@@ -6,7 +6,6 @@
DoNotCheckConstants,
NoInterfaceObject,
TypeChecking=Interface,
WillBeGarbageCollected,
] interface EXTBlendMinMax {
const unsigned long MIN_EXT = 0x8007;
const unsigned long MAX_EXT = 0x8008;
......
......@@ -25,6 +25,5 @@
[
NoInterfaceObject,
WillBeGarbageCollected,
] interface EXTFragDepth {
};
......@@ -4,6 +4,5 @@
[
NoInterfaceObject,
WillBeGarbageCollected,
] interface EXTShaderTextureLOD {
};
......@@ -26,7 +26,6 @@
[
NoInterfaceObject,
DoNotCheckConstants,
WillBeGarbageCollected,
] interface EXTTextureFilterAnisotropic {
const unsigned long TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE;
const unsigned long MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF;
......
......@@ -25,6 +25,5 @@
[
NoInterfaceObject,
WillBeGarbageCollected,
] interface OESElementIndexUint {
};
......@@ -26,7 +26,6 @@
[
NoInterfaceObject,
DoNotCheckConstants,
WillBeGarbageCollected,
] interface OESStandardDerivatives {
const unsigned long FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8B8B;
};
......@@ -25,6 +25,5 @@
[
NoInterfaceObject,
WillBeGarbageCollected,
] interface OESTextureFloat {
};
......@@ -25,6 +25,5 @@
[
NoInterfaceObject,
WillBeGarbageCollected,
] interface OESTextureFloatLinear {
};
......@@ -28,7 +28,6 @@ typedef unsigned long GLenum;
[
NoInterfaceObject,
DoNotCheckConstants,
WillBeGarbageCollected,
] interface OESTextureHalfFloat {
const GLenum HALF_FLOAT_OES = 0x8D61;
};
......@@ -25,6 +25,5 @@
[
NoInterfaceObject,
WillBeGarbageCollected,
] interface OESTextureHalfFloatLinear {
};
......@@ -27,7 +27,6 @@
DoNotCheckConstants,
NoInterfaceObject,
TypeChecking=Interface,
WillBeGarbageCollected,
] interface OESVertexArrayObject {
const unsigned long VERTEX_ARRAY_BINDING_OES = 0x85B5;
......
......@@ -31,7 +31,6 @@
[
Constructor,
Constructor(Path2D path),
WillBeGarbageCollected,
] interface Path2D {
// FIXME(sky): Fix this object.
};
......
......@@ -24,7 +24,6 @@
*/
[
WillBeGarbageCollected,
] interface WebGLActiveInfo {
readonly attribute long size;
readonly attribute unsigned long type;
......
......@@ -24,6 +24,5 @@
*/
[
WillBeGarbageCollected,
] interface WebGLBuffer {
};
......@@ -26,7 +26,6 @@
[
NoInterfaceObject,
DoNotCheckConstants,
WillBeGarbageCollected,
] interface WebGLCompressedTextureATC {
/* Compressed Texture Formats */
const unsigned long COMPRESSED_RGB_ATC_WEBGL = 0x8C92;
......
......@@ -5,7 +5,6 @@
[
NoInterfaceObject,
DoNotCheckConstants,
WillBeGarbageCollected,
] interface WebGLCompressedTextureETC1 {
/* Compressed Texture Formats */
const unsigned long COMPRESSED_RGB_ETC1_WEBGL = 0x8D64;
......
......@@ -26,7 +26,6 @@
[
NoInterfaceObject,
DoNotCheckConstants,
WillBeGarbageCollected,
] interface WebGLCompressedTexturePVRTC {
/* Compressed Texture Formats */
const unsigned long COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 0x8C00;
......
......@@ -26,7 +26,6 @@
[
NoInterfaceObject,
DoNotCheckConstants,
WillBeGarbageCollected,
] interface WebGLCompressedTextureS3TC {
/* Compressed Texture Formats */
const unsigned long COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0;
......
......@@ -26,7 +26,6 @@
[
NoInterfaceObject,
WillBeGarbageCollected,
] interface WebGLContextAttributes {
attribute boolean alpha;
attribute boolean depth;
......
......@@ -26,7 +26,6 @@
[
NoInterfaceObject,
DoNotCheckConstants,
WillBeGarbageCollected,
] interface WebGLDebugRendererInfo {
const unsigned long UNMASKED_VENDOR_WEBGL = 0x9245;
const unsigned long UNMASKED_RENDERER_WEBGL = 0x9246;
......
......@@ -26,7 +26,6 @@
[
NoInterfaceObject,
TypeChecking=Interface,
WillBeGarbageCollected,
] interface WebGLDebugShaders {
DOMString? getTranslatedShaderSource(WebGLShader? shader);
};
......@@ -26,7 +26,6 @@
[
NoInterfaceObject,
DoNotCheckConstants,
WillBeGarbageCollected,
] interface WebGLDepthTexture {
const unsigned long UNSIGNED_INT_24_8_WEBGL = 0x84FA;
};
......@@ -28,7 +28,6 @@ typedef unsigned long GLenum;
[
NoInterfaceObject,
DoNotCheckConstants,
WillBeGarbageCollected,
] interface WebGLDrawBuffers {
const GLenum COLOR_ATTACHMENT0_WEBGL = 0x8CE0;
const GLenum COLOR_ATTACHMENT1_WEBGL = 0x8CE1;
......
......@@ -24,6 +24,5 @@
*/
[
WillBeGarbageCollected,
] interface WebGLFramebuffer {
};
......@@ -26,7 +26,6 @@
[
NoInterfaceObject,
TypeChecking=Interface,
WillBeGarbageCollected,
] interface WebGLLoseContext {
void loseContext();
void restoreContext();
......
......@@ -24,6 +24,5 @@
*/
[
WillBeGarbageCollected,
] interface WebGLProgram {
};
......@@ -24,6 +24,5 @@
*/
[
WillBeGarbageCollected,
] interface WebGLRenderbuffer {
};
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册