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

Side by Side Diff: Source/bindings/tests/results/V8TestEvent.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 21 matching lines...) Expand all
32 32
33 #include "config.h" 33 #include "config.h"
34 #include "V8TestEvent.h" 34 #include "V8TestEvent.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/V8DOMConfiguration.h" 38 #include "bindings/v8/V8DOMConfiguration.h"
39 #include "core/dom/ContextFeatures.h" 39 #include "core/dom/ContextFeatures.h"
40 #include "core/dom/Document.h" 40 #include "core/dom/Document.h"
41 #include "platform/TraceEvent.h" 41 #include "platform/TraceEvent.h"
42 #include "wtf/UnusedParam.h"
43 42
44 namespace WebCore { 43 namespace WebCore {
45 44
46 static void initializeScriptWrappableForInterface(TestEvent* object) 45 static void initializeScriptWrappableForInterface(TestEvent* object)
47 { 46 {
48 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) 47 if (ScriptWrappable::wrapperCanBeStoredInObject(object))
49 ScriptWrappable::setTypeInfoInObject(object, &V8TestEvent::wrapperTypeIn fo); 48 ScriptWrappable::setTypeInfoInObject(object, &V8TestEvent::wrapperTypeIn fo);
50 else 49 else
51 ASSERT_NOT_REACHED(); 50 ASSERT_NOT_REACHED();
52 } 51 }
(...skipping 21 matching lines...) Expand all
74 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestEventTemplate(v8::Handle< v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, WrapperWorldType c urrentWorldType) 73 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestEventTemplate(v8::Handle< v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, WrapperWorldType c urrentWorldType)
75 { 74 {
76 functionTemplate->ReadOnlyPrototype(); 75 functionTemplate->ReadOnlyPrototype();
77 76
78 v8::Local<v8::Signature> defaultSignature; 77 v8::Local<v8::Signature> defaultSignature;
79 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl ate, "TestEvent", V8Event::domTemplate(isolate, currentWorldType), V8TestEvent:: internalFieldCount, 78 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl ate, "TestEvent", V8Event::domTemplate(isolate, currentWorldType), V8TestEvent:: internalFieldCount,
80 0, 0, 79 0, 0,
81 0, 0, 80 0, 0,
82 0, 0, 81 0, 0,
83 isolate, currentWorldType); 82 isolate, currentWorldType);
84 UNUSED_PARAM(defaultSignature); 83 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTempla te->InstanceTemplate();
85 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate(); 84 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTempl ate->PrototypeTemplate();
86 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate();
87 UNUSED_PARAM(instanceTemplate);
88 UNUSED_PARAM(prototypeTemplate);
89 85
90 // Custom toString template 86 // Custom toString template
91 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "toString", v8::Strin g::kInternalizedString), V8PerIsolateData::current()->toStringTemplate()); 87 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "toString", v8::Strin g::kInternalizedString), V8PerIsolateData::current()->toStringTemplate());
92 return functionTemplate; 88 return functionTemplate;
93 } 89 }
94 90
95 v8::Handle<v8::FunctionTemplate> V8TestEvent::domTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType) 91 v8::Handle<v8::FunctionTemplate> V8TestEvent::domTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
96 { 92 {
97 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 93 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
98 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo rldType).find(&wrapperTypeInfo); 94 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo rldType).find(&wrapperTypeInfo);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 fromInternalPointer(object)->deref(); 140 fromInternalPointer(object)->deref();
145 } 141 }
146 142
147 template<> 143 template<>
148 v8::Handle<v8::Value> toV8NoInline(TestEvent* impl, v8::Handle<v8::Object> creat ionContext, v8::Isolate* isolate) 144 v8::Handle<v8::Value> toV8NoInline(TestEvent* impl, v8::Handle<v8::Object> creat ionContext, v8::Isolate* isolate)
149 { 145 {
150 return toV8(impl, creationContext, isolate); 146 return toV8(impl, creationContext, isolate);
151 } 147 }
152 148
153 } // namespace WebCore 149 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestCustomAccessors.cpp ('k') | Source/bindings/tests/results/V8TestEventTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698