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/api.cc

Issue 11880018: Reland r13188, r13194, r13256 (Deferred formatting of error stack trace during GC). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/handles.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1844 matching lines...) Expand 10 before | Expand all | Expand 10 after
1855 } 1855 }
1856 1856
1857 1857
1858 v8::Local<Value> v8::TryCatch::StackTrace() const { 1858 v8::Local<Value> v8::TryCatch::StackTrace() const {
1859 ASSERT(isolate_ == i::Isolate::Current()); 1859 ASSERT(isolate_ == i::Isolate::Current());
1860 if (HasCaught()) { 1860 if (HasCaught()) {
1861 i::Object* raw_obj = reinterpret_cast<i::Object*>(exception_); 1861 i::Object* raw_obj = reinterpret_cast<i::Object*>(exception_);
1862 if (!raw_obj->IsJSObject()) return v8::Local<Value>(); 1862 if (!raw_obj->IsJSObject()) return v8::Local<Value>();
1863 i::HandleScope scope(isolate_); 1863 i::HandleScope scope(isolate_);
1864 i::Handle<i::JSObject> obj(i::JSObject::cast(raw_obj), isolate_); 1864 i::Handle<i::JSObject> obj(i::JSObject::cast(raw_obj), isolate_);
1865 i::Handle<i::String> name = 1865 i::Handle<i::String> name = isolate_->factory()->stack_symbol();
1866 isolate_->factory()->LookupOneByteSymbol(STATIC_ASCII_VECTOR("stack"));
1867 if (!obj->HasProperty(*name)) return v8::Local<Value>(); 1866 if (!obj->HasProperty(*name)) return v8::Local<Value>();
1868 i::Handle<i::Object> value = i::GetProperty(obj, name); 1867 i::Handle<i::Object> value = i::GetProperty(obj, name);
1869 if (value.is_null()) return v8::Local<Value>(); 1868 if (value.is_null()) return v8::Local<Value>();
1870 return v8::Utils::ToLocal(scope.CloseAndEscape(value)); 1869 return v8::Utils::ToLocal(scope.CloseAndEscape(value));
1871 } else { 1870 } else {
1872 return v8::Local<Value>(); 1871 return v8::Local<Value>();
1873 } 1872 }
1874 } 1873 }
1875 1874
1876 1875
(...skipping 4870 matching lines...) Expand 10 before | Expand all | Expand 10 after
6747 6746
6748 v->VisitPointers(blocks_.first(), first_block_limit_); 6747 v->VisitPointers(blocks_.first(), first_block_limit_);
6749 6748
6750 for (int i = 1; i < blocks_.length(); i++) { 6749 for (int i = 1; i < blocks_.length(); i++) {
6751 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); 6750 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]);
6752 } 6751 }
6753 } 6752 }
6754 6753
6755 6754
6756 } } // namespace v8::internal 6755 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698