| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 } | 236 } |
| 237 | 237 |
| 238 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) | 238 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) |
| 239 { | 239 { |
| 240 auto& map = selectOperationTemplateMap(world); | 240 auto& map = selectOperationTemplateMap(world); |
| 241 auto result = map.find(key); | 241 auto result = map.find(key); |
| 242 if (result != map.end()) | 242 if (result != map.end()) |
| 243 return result->value.Get(isolate()); | 243 return result->value.Get(isolate()); |
| 244 | 244 |
| 245 v8::Local<v8::FunctionTemplate> templ = v8::FunctionTemplate::New(isolate(),
callback, data, signature, length); | 245 v8::Local<v8::FunctionTemplate> templ = v8::FunctionTemplate::New(isolate(),
callback, data, signature, length); |
| 246 templ->RemovePrototype(); |
| 246 map.add(key, v8::Eternal<v8::FunctionTemplate>(isolate(), templ)); | 247 map.add(key, v8::Eternal<v8::FunctionTemplate>(isolate(), templ)); |
| 247 return templ; | 248 return templ; |
| 248 } | 249 } |
| 249 | 250 |
| 250 v8::Local<v8::FunctionTemplate> V8PerIsolateData::findInterfaceTemplate(const DO
MWrapperWorld& world, const void* key) | 251 v8::Local<v8::FunctionTemplate> V8PerIsolateData::findInterfaceTemplate(const DO
MWrapperWorld& world, const void* key) |
| 251 { | 252 { |
| 252 auto& map = selectInterfaceTemplateMap(world); | 253 auto& map = selectInterfaceTemplateMap(world); |
| 253 auto result = map.find(key); | 254 auto result = map.find(key); |
| 254 if (result != map.end()) | 255 if (result != map.end()) |
| 255 return result->value.Get(isolate()); | 256 return result->value.Get(isolate()); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 | 346 |
| 346 void V8PerIsolateData::addActiveScriptWrappable(ActiveScriptWrappable* wrappable
) | 347 void V8PerIsolateData::addActiveScriptWrappable(ActiveScriptWrappable* wrappable
) |
| 347 { | 348 { |
| 348 if (!m_activeScriptWrappables) | 349 if (!m_activeScriptWrappables) |
| 349 m_activeScriptWrappables = new ActiveScriptWrappableSet(); | 350 m_activeScriptWrappables = new ActiveScriptWrappableSet(); |
| 350 | 351 |
| 351 m_activeScriptWrappables->add(wrappable); | 352 m_activeScriptWrappables->add(wrappable); |
| 352 } | 353 } |
| 353 | 354 |
| 354 } // namespace blink | 355 } // namespace blink |
| OLD | NEW |