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

Side by Side Diff: Source/bindings/tests/results/V8TestException.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 "V8TestException.h" 34 #include "V8TestException.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(TestException* object) 45 static void initializeScriptWrappableForInterface(TestException* object)
47 { 46 {
48 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) 47 if (ScriptWrappable::wrapperCanBeStoredInObject(object))
49 ScriptWrappable::setTypeInfoInObject(object, &V8TestException::wrapperTy peInfo); 48 ScriptWrappable::setTypeInfoInObject(object, &V8TestException::wrapperTy peInfo);
50 else 49 else
51 ASSERT_NOT_REACHED(); 50 ASSERT_NOT_REACHED();
52 } 51 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestExceptionTemplate(v8::Han dle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, WrapperWorldTy pe currentWorldType) 90 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestExceptionTemplate(v8::Han dle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, WrapperWorldTy pe currentWorldType)
92 { 91 {
93 functionTemplate->ReadOnlyPrototype(); 92 functionTemplate->ReadOnlyPrototype();
94 93
95 v8::Local<v8::Signature> defaultSignature; 94 v8::Local<v8::Signature> defaultSignature;
96 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl ate, "TestException", v8::Local<v8::FunctionTemplate>(), V8TestException::intern alFieldCount, 95 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl ate, "TestException", v8::Local<v8::FunctionTemplate>(), V8TestException::intern alFieldCount,
97 V8TestExceptionAttributes, WTF_ARRAY_LENGTH(V8TestExceptionAttributes), 96 V8TestExceptionAttributes, WTF_ARRAY_LENGTH(V8TestExceptionAttributes),
98 0, 0, 97 0, 0,
99 0, 0, 98 0, 0,
100 isolate, currentWorldType); 99 isolate, currentWorldType);
101 UNUSED_PARAM(defaultSignature); 100 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTempla te->InstanceTemplate();
102 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate(); 101 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTempl ate->PrototypeTemplate();
103 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate();
104 UNUSED_PARAM(instanceTemplate);
105 UNUSED_PARAM(prototypeTemplate);
106 102
107 // Custom toString template 103 // Custom toString template
108 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "toString", v8::Strin g::kInternalizedString), V8PerIsolateData::current()->toStringTemplate()); 104 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "toString", v8::Strin g::kInternalizedString), V8PerIsolateData::current()->toStringTemplate());
109 return functionTemplate; 105 return functionTemplate;
110 } 106 }
111 107
112 v8::Handle<v8::FunctionTemplate> V8TestException::domTemplate(v8::Isolate* isola te, WrapperWorldType currentWorldType) 108 v8::Handle<v8::FunctionTemplate> V8TestException::domTemplate(v8::Isolate* isola te, WrapperWorldType currentWorldType)
113 { 109 {
114 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 110 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
115 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo rldType).find(&wrapperTypeInfo); 111 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo rldType).find(&wrapperTypeInfo);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 fromInternalPointer(object)->deref(); 157 fromInternalPointer(object)->deref();
162 } 158 }
163 159
164 template<> 160 template<>
165 v8::Handle<v8::Value> toV8NoInline(TestException* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate) 161 v8::Handle<v8::Value> toV8NoInline(TestException* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate)
166 { 162 {
167 return toV8(impl, creationContext, isolate); 163 return toV8(impl, creationContext, isolate);
168 } 164 }
169 165
170 } // namespace WebCore 166 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestEventTarget.cpp ('k') | Source/bindings/tests/results/V8TestExtendedEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698