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

Side by Side Diff: src/objects.cc

Issue 919653002: [V8] Use Function.name in Error.stack (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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/objects.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 <iomanip> 5 #include <iomanip>
6 #include <sstream> 6 #include <sstream>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 10309 matching lines...) Expand 10 before | Expand all | Expand 10 after
10320 return true; 10320 return true;
10321 } 10321 }
10322 if (filter[filter.length() - 1] == '*' && 10322 if (filter[filter.length() - 1] == '*' &&
10323 name->IsUtf8EqualTo(filter.SubVector(0, filter.length() - 1), true)) { 10323 name->IsUtf8EqualTo(filter.SubVector(0, filter.length() - 1), true)) {
10324 return true; 10324 return true;
10325 } 10325 }
10326 return false; 10326 return false;
10327 } 10327 }
10328 10328
10329 10329
10330 Handle<String> JSFunction::GetDebugName(Handle<JSFunction> function) {
10331 Isolate* isolate = function->GetIsolate();
10332 Handle<Object> name =
10333 JSObject::GetDataProperty(function, isolate->factory()->name_string());
10334 if (name->IsString()) return Handle<String>::cast(name);
10335 return handle(function->shared()->DebugName(), isolate);
10336 }
10337
10338
10330 void Oddball::Initialize(Isolate* isolate, 10339 void Oddball::Initialize(Isolate* isolate,
10331 Handle<Oddball> oddball, 10340 Handle<Oddball> oddball,
10332 const char* to_string, 10341 const char* to_string,
10333 Handle<Object> to_number, 10342 Handle<Object> to_number,
10334 byte kind) { 10343 byte kind) {
10335 Handle<String> internalized_to_string = 10344 Handle<String> internalized_to_string =
10336 isolate->factory()->InternalizeUtf8String(to_string); 10345 isolate->factory()->InternalizeUtf8String(to_string);
10337 oddball->set_to_string(*internalized_to_string); 10346 oddball->set_to_string(*internalized_to_string);
10338 oddball->set_to_number(*to_number); 10347 oddball->set_to_number(*to_number);
10339 oddball->set_kind(kind); 10348 oddball->set_kind(kind);
(...skipping 6789 matching lines...) Expand 10 before | Expand all | Expand 10 after
17129 CompilationInfo* info) { 17138 CompilationInfo* info) {
17130 Handle<DependentCode> codes = DependentCode::InsertCompilationInfo( 17139 Handle<DependentCode> codes = DependentCode::InsertCompilationInfo(
17131 handle(cell->dependent_code(), info->isolate()), 17140 handle(cell->dependent_code(), info->isolate()),
17132 DependentCode::kPropertyCellChangedGroup, info->object_wrapper()); 17141 DependentCode::kPropertyCellChangedGroup, info->object_wrapper());
17133 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); 17142 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes);
17134 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( 17143 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add(
17135 cell, info->zone()); 17144 cell, info->zone());
17136 } 17145 }
17137 17146
17138 } } // namespace v8::internal 17147 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698