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

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

Issue 2200263005: Remove ActiveDOMCallback::isScriptControllerTerminating (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 return true; 44 return true;
45 45
46 v8::Isolate* isolate = m_scriptState->isolate(); 46 v8::Isolate* isolate = m_scriptState->isolate();
47 if (!m_scriptState->contextIsValid()) 47 if (!m_scriptState->contextIsValid())
48 return true; 48 return true;
49 49
50 ScriptState::Scope scope(m_scriptState.get()); 50 ScriptState::Scope scope(m_scriptState.get());
51 51
52 v8::Local<v8::Value> transactionHandle = toV8(transaction, m_scriptState->co ntext()->Global(), isolate); 52 v8::Local<v8::Value> transactionHandle = toV8(transaction, m_scriptState->co ntext()->Global(), isolate);
53 v8::Local<v8::Value> errorHandle = toV8(error, m_scriptState->context()->Glo bal(), isolate); 53 v8::Local<v8::Value> errorHandle = toV8(error, m_scriptState->context()->Glo bal(), isolate);
54 if (transactionHandle.IsEmpty() || errorHandle.IsEmpty()) {
55 if (!isScriptControllerTerminating())
56 CRASH();
57 return true;
58 }
59
60 ASSERT(transactionHandle->IsObject()); 54 ASSERT(transactionHandle->IsObject());
61 55
62 v8::Local<v8::Value> argv[] = { 56 v8::Local<v8::Value> argv[] = {
63 transactionHandle, 57 transactionHandle,
64 errorHandle 58 errorHandle
65 }; 59 };
66 60
67 v8::TryCatch exceptionCatcher(isolate); 61 v8::TryCatch exceptionCatcher(isolate);
68 exceptionCatcher.SetVerbose(true); 62 exceptionCatcher.SetVerbose(true);
69 63
70 v8::Local<v8::Value> result; 64 v8::Local<v8::Value> result;
71 // FIXME: This comment doesn't make much sense given what the code is actual ly doing. 65 // FIXME: This comment doesn't make much sense given what the code is actual ly doing.
72 // 66 //
73 // Step 6: If the error callback returns false, then move on to the next 67 // Step 6: If the error callback returns false, then move on to the next
74 // statement, if any, or onto the next overall step otherwise. Otherwise, 68 // statement, if any, or onto the next overall step otherwise. Otherwise,
75 // the error callback did not return false, or there was no error callback. 69 // the error callback did not return false, or there was no error callback.
76 // Jump to the last step in the overall steps. 70 // Jump to the last step in the overall steps.
77 if (!V8ScriptRunner::callFunction(m_callback.newLocal(isolate), getExecution Context(), m_scriptState->context()->Global(), WTF_ARRAY_LENGTH(argv), argv, iso late).ToLocal(&result)) 71 if (!V8ScriptRunner::callFunction(m_callback.newLocal(isolate), getExecution Context(), m_scriptState->context()->Global(), WTF_ARRAY_LENGTH(argv), argv, iso late).ToLocal(&result))
78 return true; 72 return true;
79 73
80 bool value; 74 bool value;
81 V8_CALL(value, result, BooleanValue(isolate->GetCurrentContext()), return tr ue); 75 V8_CALL(value, result, BooleanValue(isolate->GetCurrentContext()), return tr ue);
82 return value; 76 return value;
83 } 77 }
84 78
85 } // namespace blink 79 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698