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

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

Issue 23799009: Always pass v8::Isolate to v8::Number::New() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 // getListenerObject() may cause JS in the event attribute to get co mpiled, potentially unsuccessfully. 249 // getListenerObject() may cause JS in the event attribute to get co mpiled, potentially unsuccessfully.
250 v8::TryCatch block; 250 v8::TryCatch block;
251 function = v8Listener->getListenerObject(document); 251 function = v8Listener->getListenerObject(document);
252 if (block.HasCaught()) 252 if (block.HasCaught())
253 continue; 253 continue;
254 } 254 }
255 ASSERT(!function.IsEmpty()); 255 ASSERT(!function.IsEmpty());
256 v8::Local<v8::Object> listenerEntry = v8::Object::New(); 256 v8::Local<v8::Object> listenerEntry = v8::Object::New();
257 listenerEntry->Set(v8::String::NewSymbol("listener"), function); 257 listenerEntry->Set(v8::String::NewSymbol("listener"), function);
258 listenerEntry->Set(v8::String::NewSymbol("useCapture"), v8::Boolean::New (listenerInfo.eventListenerVector[i].useCapture)); 258 listenerEntry->Set(v8::String::NewSymbol("useCapture"), v8::Boolean::New (listenerInfo.eventListenerVector[i].useCapture));
259 result->Set(v8::Number::New(outputIndex++), listenerEntry); 259 result->Set(v8::Number::New(v8Listener->isolate(), outputIndex++), liste nerEntry);
260 } 260 }
261 return result; 261 return result;
262 } 262 }
263 263
264 void V8InjectedScriptHost::getEventListenersMethodCustom(const v8::FunctionCallb ackInfo<v8::Value>& args) 264 void V8InjectedScriptHost::getEventListenersMethodCustom(const v8::FunctionCallb ackInfo<v8::Value>& args)
265 { 265 {
266 if (args.Length() < 1) 266 if (args.Length() < 1)
267 return; 267 return;
268 268
269 v8::Local<v8::Value> value = args[0]; 269 v8::Local<v8::Value> value = args[0];
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 int lineNumber; 427 int lineNumber;
428 int columnNumber; 428 int columnNumber;
429 if (!getFunctionLocation(args, &scriptId, &lineNumber, &columnNumber)) 429 if (!getFunctionLocation(args, &scriptId, &lineNumber, &columnNumber))
430 return; 430 return;
431 431
432 InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder()); 432 InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder());
433 host->unmonitorFunction(scriptId, lineNumber, columnNumber); 433 host->unmonitorFunction(scriptId, lineNumber, columnNumber);
434 } 434 }
435 435
436 } // namespace WebCore 436 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8IDBAnyCustom.cpp ('k') | Source/bindings/v8/custom/V8InjectedScriptManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698