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