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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 m_workerGlobalScope.script()->forbidExecution(); | 176 m_workerGlobalScope.script()->forbidExecution(); |
177 return ScriptValue(); | 177 return ScriptValue(); |
178 } | 178 } |
179 | 179 |
180 if (block.HasCaught()) { | 180 if (block.HasCaught()) { |
181 v8::Local<v8::Message> message = block.Message(); | 181 v8::Local<v8::Message> message = block.Message(); |
182 state->hadException = true; | 182 state->hadException = true; |
183 state->errorMessage = toCoreString(message->Get()); | 183 state->errorMessage = toCoreString(message->Get()); |
184 state->lineNumber = message->GetLineNumber(); | 184 state->lineNumber = message->GetLineNumber(); |
185 state->columnNumber = message->GetStartColumn() + 1; | 185 state->columnNumber = message->GetStartColumn() + 1; |
186 V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<>, sourceURL, me
ssage->GetScriptResourceName(), ScriptValue()); | 186 V8STRINGRESOURCE_PREPARE_RETURN(V8StringResource<>, sourceURL, message->
GetScriptResourceName(), ScriptValue()); |
187 state->sourceURL = sourceURL; | 187 state->sourceURL = sourceURL; |
188 state->exception = ScriptValue(block.Exception(), m_isolate); | 188 state->exception = ScriptValue(block.Exception(), m_isolate); |
189 block.Reset(); | 189 block.Reset(); |
190 } else | 190 } else |
191 state->hadException = false; | 191 state->hadException = false; |
192 | 192 |
193 if (result.IsEmpty() || result->IsUndefined()) | 193 if (result.IsEmpty() || result->IsUndefined()) |
194 return ScriptValue(); | 194 return ScriptValue(); |
195 | 195 |
196 return ScriptValue(result, m_isolate); | 196 return ScriptValue(result, m_isolate); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 m_disableEvalPending = errorMessage; | 257 m_disableEvalPending = errorMessage; |
258 } | 258 } |
259 | 259 |
260 void WorkerScriptController::rethrowExceptionFromImportedScript(PassRefPtrWillBe
RawPtr<ErrorEvent> errorEvent) | 260 void WorkerScriptController::rethrowExceptionFromImportedScript(PassRefPtrWillBe
RawPtr<ErrorEvent> errorEvent) |
261 { | 261 { |
262 m_errorEventFromImportedScript = errorEvent; | 262 m_errorEventFromImportedScript = errorEvent; |
263 throwError(V8ThrowException::createError(v8GeneralError, m_errorEventFromImp
ortedScript->message(), m_isolate), m_isolate); | 263 throwError(V8ThrowException::createError(v8GeneralError, m_errorEventFromImp
ortedScript->message(), m_isolate), m_isolate); |
264 } | 264 } |
265 | 265 |
266 } // namespace WebCore | 266 } // namespace WebCore |
OLD | NEW |