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

Side by Side Diff: Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp

Issue 14334002: Delete WorldContextHandle in favor of DOMWrapperWorld (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007-2011 Google Inc. All rights reserved. 2 * Copyright (C) 2007-2011 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 { 207 {
208 v8::Local<v8::Array> result = v8::Array::New(); 208 v8::Local<v8::Array> result = v8::Array::New();
209 size_t handlersCount = listenerInfo.eventListenerVector.size(); 209 size_t handlersCount = listenerInfo.eventListenerVector.size();
210 for (size_t i = 0, outputIndex = 0; i < handlersCount; ++i) { 210 for (size_t i = 0, outputIndex = 0; i < handlersCount; ++i) {
211 RefPtr<EventListener> listener = listenerInfo.eventListenerVector[i].lis tener; 211 RefPtr<EventListener> listener = listenerInfo.eventListenerVector[i].lis tener;
212 if (listener->type() != EventListener::JSEventListenerType) { 212 if (listener->type() != EventListener::JSEventListenerType) {
213 ASSERT_NOT_REACHED(); 213 ASSERT_NOT_REACHED();
214 continue; 214 continue;
215 } 215 }
216 V8AbstractEventListener* v8Listener = static_cast<V8AbstractEventListene r*>(listener.get()); 216 V8AbstractEventListener* v8Listener = static_cast<V8AbstractEventListene r*>(listener.get());
217 v8::Local<v8::Context> context = toV8Context(document, v8Listener->world Context()); 217 v8::Local<v8::Context> context = toV8Context(document, v8Listener->world ());
218 // Hide listeners from other contexts. 218 // Hide listeners from other contexts.
219 if (context != v8::Context::GetCurrent()) 219 if (context != v8::Context::GetCurrent())
220 continue; 220 continue;
221 v8::Local<v8::Object> function; 221 v8::Local<v8::Object> function;
222 { 222 {
223 // getListenerObject() may cause JS in the event attribute to get co mpiled, potentially unsuccessfully. 223 // getListenerObject() may cause JS in the event attribute to get co mpiled, potentially unsuccessfully.
224 v8::TryCatch block; 224 v8::TryCatch block;
225 function = v8Listener->getListenerObject(document); 225 function = v8Listener->getListenerObject(document);
226 if (block.HasCaught()) 226 if (block.HasCaught())
227 continue; 227 continue;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 v8::Handle<v8::Value> newValue = args[3]; 327 v8::Handle<v8::Value> newValue = args[3];
328 328
329 InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder()); 329 InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder());
330 ScriptDebugServer& debugServer = host->scriptDebugServer(); 330 ScriptDebugServer& debugServer = host->scriptDebugServer();
331 return debugServer.setFunctionVariableValue(functionValue, scopeIndex, varia bleName, newValue); 331 return debugServer.setFunctionVariableValue(functionValue, scopeIndex, varia bleName, newValue);
332 } 332 }
333 333
334 334
335 } // namespace WebCore 335 } // namespace WebCore
336 336
OLDNEW
« Source/bindings/v8/DOMWrapperWorld.cpp ('K') | « Source/bindings/v8/WorldContextHandle.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698