OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/messages.h" | 5 #include "src/messages.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "src/api.h" | 9 #include "src/api.h" |
10 #include "src/execution.h" | 10 #include "src/execution.h" |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 return isolate->heap()->undefined_value(); | 319 return isolate->heap()->undefined_value(); |
320 | 320 |
321 Handle<SharedFunctionInfo> eval_from_shared( | 321 Handle<SharedFunctionInfo> eval_from_shared( |
322 SharedFunctionInfo::cast(script->eval_from_shared())); | 322 SharedFunctionInfo::cast(script->eval_from_shared())); |
323 return eval_from_shared->script()->IsScript() | 323 return eval_from_shared->script()->IsScript() |
324 ? eval_from_shared->script() | 324 ? eval_from_shared->script() |
325 : isolate->heap()->undefined_value(); | 325 : isolate->heap()->undefined_value(); |
326 } | 326 } |
327 | 327 |
328 MaybeHandle<String> FormatEvalOrigin(Isolate* isolate, Handle<Script> script) { | 328 MaybeHandle<String> FormatEvalOrigin(Isolate* isolate, Handle<Script> script) { |
329 Handle<Object> sourceURL = Script::GetNameOrSourceURL(script); | 329 Handle<Object> sourceURL(script->GetNameOrSourceURL(), isolate); |
330 if (!sourceURL->IsUndefined(isolate)) { | 330 if (!sourceURL->IsUndefined(isolate)) { |
331 DCHECK(sourceURL->IsString()); | 331 DCHECK(sourceURL->IsString()); |
332 return Handle<String>::cast(sourceURL); | 332 return Handle<String>::cast(sourceURL); |
333 } | 333 } |
334 | 334 |
335 IncrementalStringBuilder builder(isolate); | 335 IncrementalStringBuilder builder(isolate); |
336 builder.AppendCString("eval at "); | 336 builder.AppendCString("eval at "); |
337 | 337 |
338 Handle<Object> eval_from_function_name = | 338 Handle<Object> eval_from_function_name = |
339 handle(EvalFromFunctionName(isolate, script), isolate); | 339 handle(EvalFromFunctionName(isolate, script), isolate); |
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1191 DCHECK(mode != SKIP_UNTIL_SEEN); | 1191 DCHECK(mode != SKIP_UNTIL_SEEN); |
1192 | 1192 |
1193 Handle<Object> no_caller; | 1193 Handle<Object> no_caller; |
1194 Handle<String> msg = FormatMessage(isolate, template_index, arg0, arg1, arg2); | 1194 Handle<String> msg = FormatMessage(isolate, template_index, arg0, arg1, arg2); |
1195 return ErrorUtils::Construct(isolate, constructor, constructor, msg, mode, | 1195 return ErrorUtils::Construct(isolate, constructor, constructor, msg, mode, |
1196 no_caller, false); | 1196 no_caller, false); |
1197 } | 1197 } |
1198 | 1198 |
1199 } // namespace internal | 1199 } // namespace internal |
1200 } // namespace v8 | 1200 } // namespace v8 |
OLD | NEW |