OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2009, Google Inc. All rights reserved. | 2 * Copyright (c) 2009, 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 v8::Handle<v8::Context> v8Context = toV8Context(scriptExecutionContext(), m_
worldContext); | 53 v8::Handle<v8::Context> v8Context = toV8Context(scriptExecutionContext(), m_
worldContext); |
54 if (v8Context.IsEmpty()) | 54 if (v8Context.IsEmpty()) |
55 return true; | 55 return true; |
56 | 56 |
57 v8::Context::Scope scope(v8Context); | 57 v8::Context::Scope scope(v8Context); |
58 | 58 |
59 v8::Handle<v8::Value> transactionHandle = toV8(transaction); | 59 v8::Handle<v8::Value> transactionHandle = toV8(transaction); |
60 v8::Handle<v8::Value> errorHandle = toV8(error); | 60 v8::Handle<v8::Value> errorHandle = toV8(error); |
61 if (transactionHandle.IsEmpty() || errorHandle.IsEmpty()) { | 61 if (transactionHandle.IsEmpty() || errorHandle.IsEmpty()) { |
62 CRASH(); | 62 if (!isScriptControllerTerminating()) |
| 63 CRASH(); |
63 return true; | 64 return true; |
64 } | 65 } |
65 | 66 |
66 v8::Handle<v8::Value> argv[] = { | 67 v8::Handle<v8::Value> argv[] = { |
67 transactionHandle, | 68 transactionHandle, |
68 errorHandle | 69 errorHandle |
69 }; | 70 }; |
70 | 71 |
71 bool callbackReturnValue = false; | 72 bool callbackReturnValue = false; |
72 // Step 6: If the error callback returns false, then move on to the next | 73 // Step 6: If the error callback returns false, then move on to the next |
73 // statement, if any, or onto the next overall step otherwise. Otherwise, | 74 // statement, if any, or onto the next overall step otherwise. Otherwise, |
74 // the error callback did not return false, or there was no error callback. | 75 // the error callback did not return false, or there was no error callback. |
75 // Jump to the last step in the overall steps. | 76 // Jump to the last step in the overall steps. |
76 return invokeCallback(m_callback, 2, argv, callbackReturnValue, scriptExecut
ionContext()) || callbackReturnValue; | 77 return invokeCallback(m_callback, 2, argv, callbackReturnValue, scriptExecut
ionContext()) || callbackReturnValue; |
77 } | 78 } |
78 | 79 |
79 } // namespace WebCore | 80 } // namespace WebCore |
80 | 81 |
81 #endif | 82 #endif |
OLD | NEW |