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

Side by Side Diff: Source/bindings/modules/v8/custom/V8CustomSQLStatementErrorCallback.cpp

Issue 1061503005: bindings: Use Maybe version of Call() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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) 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (c) 2009, 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 return true; 59 return true;
60 } 60 }
61 61
62 ASSERT(transactionHandle->IsObject()); 62 ASSERT(transactionHandle->IsObject());
63 63
64 v8::Local<v8::Value> argv[] = { 64 v8::Local<v8::Value> argv[] = {
65 transactionHandle, 65 transactionHandle,
66 errorHandle 66 errorHandle
67 }; 67 };
68 68
69 v8::TryCatch exceptionCatcher; 69 v8::TryCatch exceptionCatcher;
haraken 2015/04/18 23:10:47 Is this v8::TryCatch still needed?
bashi 2015/04/21 00:15:40 I guess so. IIUC, it swallows an exception.
70 exceptionCatcher.SetVerbose(true); 70 exceptionCatcher.SetVerbose(true);
71 71
72 v8::Local<v8::Value> result = ScriptController::callFunction(executionContex t(), m_callback.newLocal(isolate), m_scriptState->context()->Global(), WTF_ARRAY _LENGTH(argv), argv, isolate); 72 v8::Local<v8::Value> result;
73
74 // FIXME: This comment doesn't make much sense given what the code is actual ly doing. 73 // FIXME: This comment doesn't make much sense given what the code is actual ly doing.
75 // 74 //
76 // Step 6: If the error callback returns false, then move on to the next 75 // Step 6: If the error callback returns false, then move on to the next
77 // statement, if any, or onto the next overall step otherwise. Otherwise, 76 // statement, if any, or onto the next overall step otherwise. Otherwise,
78 // the error callback did not return false, or there was no error callback. 77 // the error callback did not return false, or there was no error callback.
79 // Jump to the last step in the overall steps. 78 // Jump to the last step in the overall steps.
80 if (exceptionCatcher.HasCaught()) 79 if (!ScriptController::callFunction(executionContext(), m_callback.newLocal( isolate), m_scriptState->context()->Global(), WTF_ARRAY_LENGTH(argv), argv, isol ate).ToLocal(&result))
81 return true; 80 return true;
81
82 bool value; 82 bool value;
83 V8_CALL(value, result, BooleanValue(isolate->GetCurrentContext()), return tr ue); 83 V8_CALL(value, result, BooleanValue(isolate->GetCurrentContext()), return tr ue);
84 return value; 84 return value;
85 } 85 }
86 86
87 } // namespace blink 87 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698