| OLD | NEW |
| 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 29 matching lines...) Expand all Loading... |
| 40 namespace WebCore { | 40 namespace WebCore { |
| 41 | 41 |
| 42 bool V8SQLStatementErrorCallback::handleEvent(SQLTransaction* transaction, SQLEr
ror* error) | 42 bool V8SQLStatementErrorCallback::handleEvent(SQLTransaction* transaction, SQLEr
ror* error) |
| 43 { | 43 { |
| 44 if (!canInvokeCallback()) | 44 if (!canInvokeCallback()) |
| 45 return true; | 45 return true; |
| 46 | 46 |
| 47 v8::Isolate* isolate = v8::Isolate::GetCurrent(); | 47 v8::Isolate* isolate = v8::Isolate::GetCurrent(); |
| 48 v8::HandleScope handleScope(isolate); | 48 v8::HandleScope handleScope(isolate); |
| 49 | 49 |
| 50 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), *m_world
); | 50 v8::Handle<v8::Context> v8Context = toV8Context(executionContext(), m_world.
get()); |
| 51 if (v8Context.IsEmpty()) | 51 if (v8Context.IsEmpty()) |
| 52 return true; | 52 return true; |
| 53 | 53 |
| 54 v8::Context::Scope scope(v8Context); | 54 v8::Context::Scope scope(v8Context); |
| 55 | 55 |
| 56 v8::Handle<v8::Value> transactionHandle = toV8(transaction, v8::Handle<v8::O
bject>(), v8Context->GetIsolate()); | 56 v8::Handle<v8::Value> transactionHandle = toV8(transaction, v8::Handle<v8::O
bject>(), v8Context->GetIsolate()); |
| 57 v8::Handle<v8::Value> errorHandle = toV8(error, v8::Handle<v8::Object>(), is
olate); | 57 v8::Handle<v8::Value> errorHandle = toV8(error, v8::Handle<v8::Object>(), is
olate); |
| 58 if (transactionHandle.IsEmpty() || errorHandle.IsEmpty()) { | 58 if (transactionHandle.IsEmpty() || errorHandle.IsEmpty()) { |
| 59 if (!isScriptControllerTerminating()) | 59 if (!isScriptControllerTerminating()) |
| 60 CRASH(); | 60 CRASH(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 74 // FIXME: This comment doesn't make much sense given what the code is actual
ly doing. | 74 // FIXME: This comment doesn't make much sense given what the code is actual
ly doing. |
| 75 // | 75 // |
| 76 // Step 6: If the error callback returns false, then move on to the next | 76 // 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, | 77 // 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. | 78 // the error callback did not return false, or there was no error callback. |
| 79 // Jump to the last step in the overall steps. | 79 // Jump to the last step in the overall steps. |
| 80 return exceptionCatcher.HasCaught() || (!result.IsEmpty() && result->Boolean
Value()); | 80 return exceptionCatcher.HasCaught() || (!result.IsEmpty() && result->Boolean
Value()); |
| 81 } | 81 } |
| 82 | 82 |
| 83 } // namespace WebCore | 83 } // namespace WebCore |
| OLD | NEW |