Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Unified Diff: Source/bindings/core/v8/V8Binding.cpp

Issue 1008353002: bindings: Reduces the binary size by reducing # of callback functions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/core/v8/V8Binding.h ('k') | Source/bindings/core/v8/WrapperTypeInfo.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/V8Binding.cpp
diff --git a/Source/bindings/core/v8/V8Binding.cpp b/Source/bindings/core/v8/V8Binding.cpp
index 0f8d64c7f9f1fb2f4e19bbb1093a8014f51af597..1621a342c7563c7f561ca13bb7bc52872ec1d49c 100644
--- a/Source/bindings/core/v8/V8Binding.cpp
+++ b/Source/bindings/core/v8/V8Binding.cpp
@@ -74,21 +74,6 @@
namespace blink {
-namespace {
-
-template<class Callback>
-void v8ConstructorAttributeGetter(const Callback& info)
-{
- v8::Local<v8::Value> data = info.Data();
- ASSERT(data->IsExternal());
- V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->CreationContext());
- if (!perContextData)
- return;
- v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::unwrap(data)));
-}
-
-} // namespace
-
void setArityTypeError(ExceptionState& exceptionState, const char* valid, unsigned provided)
{
exceptionState.throwTypeError(ExceptionMessages::invalidArity(valid, provided));
@@ -1021,14 +1006,16 @@ PassRefPtr<TraceEvent::ConvertableToTraceFormat> devToolsTraceEventData(v8::Isol
return InspectorFunctionCallEvent::data(context, info.scriptId(), info.resourceName(), info.lineNumber());
}
-void v8ConstructorAttributeGetterAsProperty(v8::Local<v8::Name> propertyName, const v8::PropertyCallbackInfo<v8::Value>& info)
+void v8ConstructorAttributeGetter(v8::Local<v8::Name> propertyName, const v8::PropertyCallbackInfo<v8::Value>& info)
{
- v8ConstructorAttributeGetter(info);
-}
-
-void v8ConstructorAttributeGetterAsAccessor(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- v8ConstructorAttributeGetter(info);
+ TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
+ v8::Local<v8::Value> data = info.Data();
+ ASSERT(data->IsExternal());
+ V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->CreationContext());
+ if (!perContextData)
+ return;
+ v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::unwrap(data)));
+ TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
}
} // namespace blink
« no previous file with comments | « Source/bindings/core/v8/V8Binding.h ('k') | Source/bindings/core/v8/WrapperTypeInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698