Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: src/messages.cc

Issue 1713663002: Revert of Use displayName in Error.stack rendering if present. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/messages.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "src/api.h" 7 #include "src/api.h"
8 #include "src/execution.h" 8 #include "src/execution.h"
9 #include "src/isolate-inl.h" 9 #include "src/isolate-inl.h"
10 #include "src/string-builder.h" 10 #include "src/string-builder.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 184
185 Handle<Object> script(fun_->shared()->script(), isolate_); 185 Handle<Object> script(fun_->shared()->script(), isolate_);
186 if (script->IsScript() && 186 if (script->IsScript() &&
187 Handle<Script>::cast(script)->compilation_type() == 187 Handle<Script>::cast(script)->compilation_type() ==
188 Script::COMPILATION_TYPE_EVAL) { 188 Script::COMPILATION_TYPE_EVAL) {
189 return isolate_->factory()->eval_string(); 189 return isolate_->factory()->eval_string();
190 } 190 }
191 return isolate_->factory()->null_value(); 191 return isolate_->factory()->null_value();
192 } 192 }
193 193
194 Handle<Object> CallSite::GetDebugName() {
195 Handle<Object> name = JSReceiver::GetDataProperty(
196 fun_, isolate_->factory()->display_name_string());
197 if (name->IsString() && String::cast(*name)->length() != 0) {
198 return Handle<String>::cast(name);
199 }
200 return isolate_->factory()->null_value();
201 }
202 194
203 Handle<Object> CallSite::GetScriptNameOrSourceUrl() { 195 Handle<Object> CallSite::GetScriptNameOrSourceUrl() {
204 Handle<Object> script_obj(fun_->shared()->script(), isolate_); 196 Handle<Object> script_obj(fun_->shared()->script(), isolate_);
205 if (script_obj->IsScript()) { 197 if (script_obj->IsScript()) {
206 Handle<Script> script = Handle<Script>::cast(script_obj); 198 Handle<Script> script = Handle<Script>::cast(script_obj);
207 Object* source_url = script->source_url(); 199 Object* source_url = script->source_url();
208 if (source_url->IsString()) return Handle<Object>(source_url, isolate_); 200 if (source_url->IsString()) return Handle<Object>(source_url, isolate_);
209 return Handle<Object>(script->name(), isolate_); 201 return Handle<Object>(script->name(), isolate_);
210 } 202 }
211 return isolate_->factory()->null_value(); 203 return isolate_->factory()->null_value();
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 builder.AppendCharacter(*c); 400 builder.AppendCharacter(*c);
409 } 401 }
410 } 402 }
411 403
412 return builder.Finish(); 404 return builder.Finish();
413 } 405 }
414 406
415 407
416 } // namespace internal 408 } // namespace internal
417 } // namespace v8 409 } // namespace v8
OLDNEW
« no previous file with comments | « src/messages.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698