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

Side by Side Diff: Source/bindings/v8/V8AdaptorFunction.cpp

Issue 14083009: Remove ENABLE_CUSTOM_ELEMENTS compile time flag (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removing flag from features.gypi Created 7 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "V8AdaptorFunction.h" 32 #include "V8AdaptorFunction.h"
33 33
34 #include "V8PerIsolateData.h" 34 #include "V8PerIsolateData.h"
35 #include <wtf/Vector.h> 35 #include <wtf/Vector.h>
36 36
37 #if ENABLE(CUSTOM_ELEMENTS)
38 37
39 namespace WebCore { 38 namespace WebCore {
40 39
41 WrapperTypeInfo V8AdaptorFunction::info = { V8AdaptorFunction::getTemplate, 0, 0 , 0, 0, 0, 0, WrapperTypeObjectPrototype }; 40 WrapperTypeInfo V8AdaptorFunction::info = { V8AdaptorFunction::getTemplate, 0, 0 , 0, 0, 0, 0, WrapperTypeObjectPrototype };
42 41
43 v8::Persistent<v8::FunctionTemplate> V8AdaptorFunction::getTemplate(v8::Isolate* isolate, WrapperWorldType worldType) 42 v8::Persistent<v8::FunctionTemplate> V8AdaptorFunction::getTemplate(v8::Isolate* isolate, WrapperWorldType worldType)
44 { 43 {
45 ASSERT(isolate); 44 ASSERT(isolate);
46 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 45 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
47 V8PerIsolateData::TemplateMap::iterator result = data->rawTemplateMap(worldT ype).find(&info); 46 V8PerIsolateData::TemplateMap::iterator result = data->rawTemplateMap(worldT ype).find(&info);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 if (adaptor.IsEmpty()) 79 if (adaptor.IsEmpty())
81 return v8::Handle<v8::Function>(); 80 return v8::Handle<v8::Function>();
82 adaptor->SetName(v8String(name.string(), isolate)); 81 adaptor->SetName(v8String(name.string(), isolate));
83 adaptor->SetHiddenValue(V8HiddenPropertyName::adaptorFunctionPeer(), object) ; 82 adaptor->SetHiddenValue(V8HiddenPropertyName::adaptorFunctionPeer(), object) ;
84 object->SetHiddenValue(V8HiddenPropertyName::adaptorFunctionPeer(), adaptor) ; 83 object->SetHiddenValue(V8HiddenPropertyName::adaptorFunctionPeer(), adaptor) ;
85 return adaptor; 84 return adaptor;
86 } 85 }
87 86
88 } // namespace WebCore 87 } // namespace WebCore
89 88
90 #endif // ENABLE(CUSTOM_ELEMENTS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698