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

Side by Side Diff: Source/bindings/tests/results/V8TestInterfaceConstructor.cpp

Issue 34273002: Remove UnusedParam.h (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove unnecessary ALLOW_UNUSED from the binding generator Created 7 years 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 unified diff | Download patch
OLDNEW
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 24 matching lines...) Expand all
35 35
36 #include "RuntimeEnabledFeatures.h" 36 #include "RuntimeEnabledFeatures.h"
37 #include "bindings/v8/ExceptionMessages.h" 37 #include "bindings/v8/ExceptionMessages.h"
38 #include "bindings/v8/V8Binding.h" 38 #include "bindings/v8/V8Binding.h"
39 #include "bindings/v8/V8DOMConfiguration.h" 39 #include "bindings/v8/V8DOMConfiguration.h"
40 #include "bindings/v8/V8DOMWrapper.h" 40 #include "bindings/v8/V8DOMWrapper.h"
41 #include "bindings/v8/V8ObjectConstructor.h" 41 #include "bindings/v8/V8ObjectConstructor.h"
42 #include "core/dom/ContextFeatures.h" 42 #include "core/dom/ContextFeatures.h"
43 #include "core/dom/Document.h" 43 #include "core/dom/Document.h"
44 #include "platform/TraceEvent.h" 44 #include "platform/TraceEvent.h"
45 #include "wtf/UnusedParam.h"
46 45
47 namespace WebCore { 46 namespace WebCore {
48 47
49 static void initializeScriptWrappableForInterface(TestInterfaceConstructor* obje ct) 48 static void initializeScriptWrappableForInterface(TestInterfaceConstructor* obje ct)
50 { 49 {
51 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) 50 if (ScriptWrappable::wrapperCanBeStoredInObject(object))
52 ScriptWrappable::setTypeInfoInObject(object, &V8TestInterfaceConstructor ::wrapperTypeInfo); 51 ScriptWrappable::setTypeInfoInObject(object, &V8TestInterfaceConstructor ::wrapperTypeInfo);
53 else 52 else
54 ASSERT_NOT_REACHED(); 53 ASSERT_NOT_REACHED();
55 } 54 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestInterfaceConstructorTempl ate(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, Wra pperWorldType currentWorldType) 101 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestInterfaceConstructorTempl ate(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, Wra pperWorldType currentWorldType)
103 { 102 {
104 functionTemplate->ReadOnlyPrototype(); 103 functionTemplate->ReadOnlyPrototype();
105 104
106 v8::Local<v8::Signature> defaultSignature; 105 v8::Local<v8::Signature> defaultSignature;
107 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl ate, "TestInterfaceConstructor", v8::Local<v8::FunctionTemplate>(), V8TestInterf aceConstructor::internalFieldCount, 106 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl ate, "TestInterfaceConstructor", v8::Local<v8::FunctionTemplate>(), V8TestInterf aceConstructor::internalFieldCount,
108 0, 0, 107 0, 0,
109 0, 0, 108 0, 0,
110 0, 0, 109 0, 0,
111 isolate, currentWorldType); 110 isolate, currentWorldType);
112 UNUSED_PARAM(defaultSignature);
113 functionTemplate->SetCallHandler(V8TestInterfaceConstructor::constructorCall back); 111 functionTemplate->SetCallHandler(V8TestInterfaceConstructor::constructorCall back);
114 functionTemplate->SetLength(0); 112 functionTemplate->SetLength(0);
115 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate(); 113 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTempla te->InstanceTemplate();
116 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate(); 114 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTempl ate->PrototypeTemplate();
117 UNUSED_PARAM(instanceTemplate);
118 UNUSED_PARAM(prototypeTemplate);
119 115
120 // Custom toString template 116 // Custom toString template
121 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "toString", v8::Strin g::kInternalizedString), V8PerIsolateData::current()->toStringTemplate()); 117 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "toString", v8::Strin g::kInternalizedString), V8PerIsolateData::current()->toStringTemplate());
122 return functionTemplate; 118 return functionTemplate;
123 } 119 }
124 120
125 v8::Handle<v8::FunctionTemplate> V8TestInterfaceConstructor::GetTemplate(v8::Iso late* isolate, WrapperWorldType currentWorldType) 121 v8::Handle<v8::FunctionTemplate> V8TestInterfaceConstructor::GetTemplate(v8::Iso late* isolate, WrapperWorldType currentWorldType)
126 { 122 {
127 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 123 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
128 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo rldType).find(&wrapperTypeInfo); 124 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo rldType).find(&wrapperTypeInfo);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 fromInternalPointer(object)->deref(); 170 fromInternalPointer(object)->deref();
175 } 171 }
176 172
177 template<> 173 template<>
178 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate) 174 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate)
179 { 175 {
180 return toV8(impl, creationContext, isolate); 176 return toV8(impl, creationContext, isolate);
181 } 177 }
182 178
183 } // namespace WebCore 179 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698