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

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

Issue 34273002: Remove UnusedParam.h (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase 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 22 matching lines...) Expand all
33 #include "config.h" 33 #include "config.h"
34 #include "V8TestCustomAccessors.h" 34 #include "V8TestCustomAccessors.h"
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/ExceptionState.h" 38 #include "bindings/v8/ExceptionState.h"
39 #include "bindings/v8/V8DOMConfiguration.h" 39 #include "bindings/v8/V8DOMConfiguration.h"
40 #include "core/dom/ContextFeatures.h" 40 #include "core/dom/ContextFeatures.h"
41 #include "core/dom/Document.h" 41 #include "core/dom/Document.h"
42 #include "platform/TraceEvent.h" 42 #include "platform/TraceEvent.h"
43 #include "wtf/UnusedParam.h"
44 43
45 namespace WebCore { 44 namespace WebCore {
46 45
47 static void initializeScriptWrappableForInterface(TestCustomAccessors* object) 46 static void initializeScriptWrappableForInterface(TestCustomAccessors* object)
48 { 47 {
49 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) 48 if (ScriptWrappable::wrapperCanBeStoredInObject(object))
50 ScriptWrappable::setTypeInfoInObject(object, &V8TestCustomAccessors::wra pperTypeInfo); 49 ScriptWrappable::setTypeInfoInObject(object, &V8TestCustomAccessors::wra pperTypeInfo);
51 else 50 else
52 ASSERT_NOT_REACHED(); 51 ASSERT_NOT_REACHED();
53 } 52 }
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestCustomAccessorsTemplate(v 8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, WrapperW orldType currentWorldType) 152 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestCustomAccessorsTemplate(v 8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, WrapperW orldType currentWorldType)
154 { 153 {
155 functionTemplate->ReadOnlyPrototype(); 154 functionTemplate->ReadOnlyPrototype();
156 155
157 v8::Local<v8::Signature> defaultSignature; 156 v8::Local<v8::Signature> defaultSignature;
158 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl ate, "TestCustomAccessors", v8::Local<v8::FunctionTemplate>(), V8TestCustomAcces sors::internalFieldCount, 157 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl ate, "TestCustomAccessors", v8::Local<v8::FunctionTemplate>(), V8TestCustomAcces sors::internalFieldCount,
159 0, 0, 158 0, 0,
160 0, 0, 159 0, 0,
161 V8TestCustomAccessorsMethods, WTF_ARRAY_LENGTH(V8TestCustomAccessorsMeth ods), 160 V8TestCustomAccessorsMethods, WTF_ARRAY_LENGTH(V8TestCustomAccessorsMeth ods),
162 isolate, currentWorldType); 161 isolate, currentWorldType);
163 UNUSED_PARAM(defaultSignature); 162 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTempla te->InstanceTemplate();
164 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate(); 163 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTempl ate->PrototypeTemplate();
165 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate();
166 UNUSED_PARAM(instanceTemplate);
167 UNUSED_PARAM(prototypeTemplate);
168 functionTemplate->InstanceTemplate()->SetIndexedPropertyHandler(TestCustomAc cessorsV8Internal::indexedPropertyGetterCallback, TestCustomAccessorsV8Internal: :indexedPropertySetterCallback, 0, TestCustomAccessorsV8Internal::indexedPropert yDeleterCallback, 0); 164 functionTemplate->InstanceTemplate()->SetIndexedPropertyHandler(TestCustomAc cessorsV8Internal::indexedPropertyGetterCallback, TestCustomAccessorsV8Internal: :indexedPropertySetterCallback, 0, TestCustomAccessorsV8Internal::indexedPropert yDeleterCallback, 0);
169 functionTemplate->InstanceTemplate()->SetNamedPropertyHandler(TestCustomAcce ssorsV8Internal::namedPropertyGetterCallback, TestCustomAccessorsV8Internal::nam edPropertySetterCallback, TestCustomAccessorsV8Internal::namedPropertyQueryCallb ack, TestCustomAccessorsV8Internal::namedPropertyDeleterCallback, TestCustomAcce ssorsV8Internal::namedPropertyEnumeratorCallback); 165 functionTemplate->InstanceTemplate()->SetNamedPropertyHandler(TestCustomAcce ssorsV8Internal::namedPropertyGetterCallback, TestCustomAccessorsV8Internal::nam edPropertySetterCallback, TestCustomAccessorsV8Internal::namedPropertyQueryCallb ack, TestCustomAccessorsV8Internal::namedPropertyDeleterCallback, TestCustomAcce ssorsV8Internal::namedPropertyEnumeratorCallback);
170 166
171 // Custom toString template 167 // Custom toString template
172 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "toString", v8::Strin g::kInternalizedString), V8PerIsolateData::current()->toStringTemplate()); 168 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "toString", v8::Strin g::kInternalizedString), V8PerIsolateData::current()->toStringTemplate());
173 return functionTemplate; 169 return functionTemplate;
174 } 170 }
175 171
176 v8::Handle<v8::FunctionTemplate> V8TestCustomAccessors::domTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType) 172 v8::Handle<v8::FunctionTemplate> V8TestCustomAccessors::domTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
177 { 173 {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 fromInternalPointer(object)->deref(); 221 fromInternalPointer(object)->deref();
226 } 222 }
227 223
228 template<> 224 template<>
229 v8::Handle<v8::Value> toV8NoInline(TestCustomAccessors* impl, v8::Handle<v8::Obj ect> creationContext, v8::Isolate* isolate) 225 v8::Handle<v8::Value> toV8NoInline(TestCustomAccessors* impl, v8::Handle<v8::Obj ect> creationContext, v8::Isolate* isolate)
230 { 226 {
231 return toV8(impl, creationContext, isolate); 227 return toV8(impl, creationContext, isolate);
232 } 228 }
233 229
234 } // namespace WebCore 230 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8SupportTestInterface.cpp ('k') | Source/bindings/tests/results/V8TestEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698