OLD | NEW |
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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 } | 270 } |
271 | 271 |
272 v8::Local<v8::FunctionTemplate> V8PerIsolateData::findOrCreateOperationTemplate(
const DOMWrapperWorld& world, const void* key, v8::FunctionCallback callback, v8
::Local<v8::Value> data, v8::Local<v8::Signature> signature, int length) | 272 v8::Local<v8::FunctionTemplate> V8PerIsolateData::findOrCreateOperationTemplate(
const DOMWrapperWorld& world, const void* key, v8::FunctionCallback callback, v8
::Local<v8::Value> data, v8::Local<v8::Signature> signature, int length) |
273 { | 273 { |
274 auto& map = selectOperationTemplateMap(world); | 274 auto& map = selectOperationTemplateMap(world); |
275 auto result = map.find(key); | 275 auto result = map.find(key); |
276 if (result != map.end()) | 276 if (result != map.end()) |
277 return result->value.Get(isolate()); | 277 return result->value.Get(isolate()); |
278 | 278 |
279 v8::Local<v8::FunctionTemplate> templ = v8::FunctionTemplate::New(isolate(),
callback, data, signature, length); | 279 v8::Local<v8::FunctionTemplate> templ = v8::FunctionTemplate::New(isolate(),
callback, data, signature, length); |
| 280 templ->RemovePrototype(); |
280 map.add(key, v8::Eternal<v8::FunctionTemplate>(isolate(), templ)); | 281 map.add(key, v8::Eternal<v8::FunctionTemplate>(isolate(), templ)); |
281 return templ; | 282 return templ; |
282 } | 283 } |
283 | 284 |
284 v8::Local<v8::FunctionTemplate> V8PerIsolateData::findInterfaceTemplate(const DO
MWrapperWorld& world, const void* key) | 285 v8::Local<v8::FunctionTemplate> V8PerIsolateData::findInterfaceTemplate(const DO
MWrapperWorld& world, const void* key) |
285 { | 286 { |
286 auto& map = selectInterfaceTemplateMap(world); | 287 auto& map = selectInterfaceTemplateMap(world); |
287 auto result = map.find(key); | 288 auto result = map.find(key); |
288 if (result != map.end()) | 289 if (result != map.end()) |
289 return result->value.Get(isolate()); | 290 return result->value.Get(isolate()); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 | 380 |
380 void V8PerIsolateData::addActiveScriptWrappable(ActiveScriptWrappable* wrappable
) | 381 void V8PerIsolateData::addActiveScriptWrappable(ActiveScriptWrappable* wrappable
) |
381 { | 382 { |
382 if (!m_activeScriptWrappables) | 383 if (!m_activeScriptWrappables) |
383 m_activeScriptWrappables = new ActiveScriptWrappableSet(); | 384 m_activeScriptWrappables = new ActiveScriptWrappableSet(); |
384 | 385 |
385 m_activeScriptWrappables->add(wrappable); | 386 m_activeScriptWrappables->add(wrappable); |
386 } | 387 } |
387 | 388 |
388 } // namespace blink | 389 } // namespace blink |
OLD | NEW |