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

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 10236 matching lines...) Expand 10 before | Expand all | Expand 10 after
10247 return true; 10247 return true;
10248 } 10248 }
10249 if (filter[filter.length() - 1] == '*' && 10249 if (filter[filter.length() - 1] == '*' &&
10250 name->IsUtf8EqualTo(filter.SubVector(0, filter.length() - 1), true)) { 10250 name->IsUtf8EqualTo(filter.SubVector(0, filter.length() - 1), true)) {
10251 return true; 10251 return true;
10252 } 10252 }
10253 return false; 10253 return false;
10254 } 10254 }
10255 10255
10256 10256
10257 String* JSFunction::DebugName() {
10258 HandleScope scope(GetIsolate());
kozy 2015/03/10 15:26:08 Without this handle scope some tests fails with #
10259 Handle<JSFunction> self(this);
10260 Handle<Object> name =
10261 JSObject::GetDataProperty(self, GetIsolate()->factory()->name_string());
10262 if (name->IsString()) return String::cast(*name);
10263 return shared()->DebugName();
10264 }
10265
10266
10257 void Oddball::Initialize(Isolate* isolate, 10267 void Oddball::Initialize(Isolate* isolate,
10258 Handle<Oddball> oddball, 10268 Handle<Oddball> oddball,
10259 const char* to_string, 10269 const char* to_string,
10260 Handle<Object> to_number, 10270 Handle<Object> to_number,
10261 byte kind) { 10271 byte kind) {
10262 Handle<String> internalized_to_string = 10272 Handle<String> internalized_to_string =
10263 isolate->factory()->InternalizeUtf8String(to_string); 10273 isolate->factory()->InternalizeUtf8String(to_string);
10264 oddball->set_to_string(*internalized_to_string); 10274 oddball->set_to_string(*internalized_to_string);
10265 oddball->set_to_number(*to_number); 10275 oddball->set_to_number(*to_number);
10266 oddball->set_kind(kind); 10276 oddball->set_kind(kind);
(...skipping 6803 matching lines...) Expand 10 before | Expand all | Expand 10 after
17070 CompilationInfo* info) { 17080 CompilationInfo* info) {
17071 Handle<DependentCode> codes = DependentCode::InsertCompilationInfo( 17081 Handle<DependentCode> codes = DependentCode::InsertCompilationInfo(
17072 handle(cell->dependent_code(), info->isolate()), 17082 handle(cell->dependent_code(), info->isolate()),
17073 DependentCode::kPropertyCellChangedGroup, info->object_wrapper()); 17083 DependentCode::kPropertyCellChangedGroup, info->object_wrapper());
17074 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); 17084 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes);
17075 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( 17085 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add(
17076 cell, info->zone()); 17086 cell, info->zone());
17077 } 17087 }
17078 17088
17079 } } // namespace v8::internal 17089 } } // 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