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

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

Issue 330163004: Fix V8 callback binding for "CallWith=ThisValue" attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add extra layout test cases from https://codereview.chromium.org/330973002. Created 6 years, 6 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
« no previous file with comments | « Source/bindings/v8/V8Callback.h ('k') | no next file » | 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 23 matching lines...) Expand all
34 #include "bindings/v8/ScriptController.h" 34 #include "bindings/v8/ScriptController.h"
35 #include "core/dom/Document.h" 35 #include "core/dom/Document.h"
36 36
37 namespace WebCore { 37 namespace WebCore {
38 38
39 bool invokeCallback(ScriptState* scriptState, v8::Local<v8::Function> callback, int argc, v8::Handle<v8::Value> argv[]) 39 bool invokeCallback(ScriptState* scriptState, v8::Local<v8::Function> callback, int argc, v8::Handle<v8::Value> argv[])
40 { 40 {
41 return invokeCallback(scriptState, callback, scriptState->context()->Global( ), argc, argv); 41 return invokeCallback(scriptState, callback, scriptState->context()->Global( ), argc, argv);
42 } 42 }
43 43
44 bool invokeCallback(ScriptState* scriptState, v8::Local<v8::Function> callback, v8::Handle<v8::Object> thisObject, int argc, v8::Handle<v8::Value> argv[]) 44 bool invokeCallback(ScriptState* scriptState, v8::Local<v8::Function> callback, v8::Handle<v8::Value> thisValue, int argc, v8::Handle<v8::Value> argv[])
45 { 45 {
46 v8::TryCatch exceptionCatcher; 46 v8::TryCatch exceptionCatcher;
47 exceptionCatcher.SetVerbose(true); 47 exceptionCatcher.SetVerbose(true);
48 ScriptController::callFunction(scriptState->executionContext(), callback, th isObject, argc, argv, scriptState->isolate()); 48 ScriptController::callFunction(scriptState->executionContext(), callback, th isValue, argc, argv, scriptState->isolate());
49 return !exceptionCatcher.HasCaught(); 49 return !exceptionCatcher.HasCaught();
50 } 50 }
51 51
52 } // namespace WebCore 52 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8Callback.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698