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

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

Issue 193123002: Use new V8 Microtask Queue API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/V8PerIsolateData.h ('k') | Source/core/dom/Microtask.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 if (result != templates.end()) 111 if (result != templates.end())
112 return result->value.newLocal(m_isolate); 112 return result->value.newLocal(m_isolate);
113 return v8::Local<v8::FunctionTemplate>(); 113 return v8::Local<v8::FunctionTemplate>();
114 } 114 }
115 115
116 void V8PerIsolateData::setDOMTemplate(WrapperWorldType currentWorldType, void* d omTemplateKey, v8::Handle<v8::FunctionTemplate> templ) 116 void V8PerIsolateData::setDOMTemplate(WrapperWorldType currentWorldType, void* d omTemplateKey, v8::Handle<v8::FunctionTemplate> templ)
117 { 117 {
118 templateMap(currentWorldType).add(domTemplateKey, UnsafePersistent<v8::Funct ionTemplate>(m_isolate, templ)); 118 templateMap(currentWorldType).add(domTemplateKey, UnsafePersistent<v8::Funct ionTemplate>(m_isolate, templ));
119 } 119 }
120 120
121 v8::Local<v8::Context> V8PerIsolateData::ensureRegexContext() 121 v8::Local<v8::Context> V8PerIsolateData::ensureDomInJSContext()
122 { 122 {
123 if (m_regexContext.isEmpty()) 123 if (m_domInJSContext.isEmpty())
124 m_regexContext.set(m_isolate, v8::Context::New(m_isolate)); 124 m_domInJSContext.set(m_isolate, v8::Context::New(m_isolate));
125 return m_regexContext.newLocal(m_isolate); 125 return m_domInJSContext.newLocal(m_isolate);
126 } 126 }
127 127
128 bool V8PerIsolateData::hasInstance(const WrapperTypeInfo* info, v8::Handle<v8::V alue> value) 128 bool V8PerIsolateData::hasInstance(const WrapperTypeInfo* info, v8::Handle<v8::V alue> value)
129 { 129 {
130 return hasInstance(info, value, m_templatesForMainWorld) 130 return hasInstance(info, value, m_templatesForMainWorld)
131 || hasInstance(info, value, m_templatesForNonMainWorld); 131 || hasInstance(info, value, m_templatesForNonMainWorld);
132 } 132 }
133 133
134 bool V8PerIsolateData::hasInstance(const WrapperTypeInfo* info, v8::Handle<v8::V alue> value, TemplateMap& templates) 134 bool V8PerIsolateData::hasInstance(const WrapperTypeInfo* info, v8::Handle<v8::V alue> value, TemplateMap& templates)
135 { 135 {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 } 178 }
179 179
180 v8::Handle<v8::FunctionTemplate> V8PerIsolateData::toStringTemplate() 180 v8::Handle<v8::FunctionTemplate> V8PerIsolateData::toStringTemplate()
181 { 181 {
182 if (m_toStringTemplate.isEmpty()) 182 if (m_toStringTemplate.isEmpty())
183 m_toStringTemplate.set(m_isolate, v8::FunctionTemplate::New(m_isolate, c onstructorOfToString)); 183 m_toStringTemplate.set(m_isolate, v8::FunctionTemplate::New(m_isolate, c onstructorOfToString));
184 return m_toStringTemplate.newLocal(m_isolate); 184 return m_toStringTemplate.newLocal(m_isolate);
185 } 185 }
186 186
187 } // namespace WebCore 187 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8PerIsolateData.h ('k') | Source/core/dom/Microtask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698