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

Side by Side Diff: src/api.cc

Issue 10443085: Report syntax errors in natives when building with mksnapshot. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 6 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 | « include/v8.h ('k') | src/factory.h » ('j') | src/factory.h » ('J')
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 1648 matching lines...) Expand 10 before | Expand all | Expand 10 after
1659 exception_(isolate_->heap()->the_hole_value()), 1659 exception_(isolate_->heap()->the_hole_value()),
1660 message_(i::Smi::FromInt(0)), 1660 message_(i::Smi::FromInt(0)),
1661 is_verbose_(false), 1661 is_verbose_(false),
1662 can_continue_(true), 1662 can_continue_(true),
1663 capture_message_(true), 1663 capture_message_(true),
1664 rethrow_(false) { 1664 rethrow_(false) {
1665 isolate_->RegisterTryCatchHandler(this); 1665 isolate_->RegisterTryCatchHandler(this);
1666 } 1666 }
1667 1667
1668 1668
1669 // This doesn't actually use the serializer for anything, it's just a token
1670 // to get the special constructor that is only intended for mksnapshot.
1671 v8::TryCatch::TryCatch(const i::Serializer* serializer)
1672 : isolate_(i::Isolate::Current()),
1673 next_(isolate_->try_catch_handler_address()),
1674 exception_(i::Smi::FromInt(0)),
ulan 2012/05/31 08:48:52 Why is exception_ = 0 here, instead of the hole? t
Erik Corry 2012/05/31 12:25:17 Well spotted. It turns out that I can just test t
1675 message_(i::Smi::FromInt(0)),
1676 is_verbose_(false),
1677 can_continue_(true),
1678 capture_message_(true),
1679 rethrow_(false) {
1680 isolate_->RegisterTryCatchHandler(this);
1681 }
1682
1683
1669 v8::TryCatch::~TryCatch() { 1684 v8::TryCatch::~TryCatch() {
1670 ASSERT(isolate_ == i::Isolate::Current()); 1685 ASSERT(isolate_ == i::Isolate::Current());
1671 if (rethrow_) { 1686 if (rethrow_) {
1672 v8::HandleScope scope; 1687 v8::HandleScope scope;
1673 v8::Local<v8::Value> exc = v8::Local<v8::Value>::New(Exception()); 1688 v8::Local<v8::Value> exc = v8::Local<v8::Value>::New(Exception());
1674 isolate_->UnregisterTryCatchHandler(this); 1689 isolate_->UnregisterTryCatchHandler(this);
1675 v8::ThrowException(exc); 1690 v8::ThrowException(exc);
1676 } else { 1691 } else {
1677 isolate_->UnregisterTryCatchHandler(this); 1692 isolate_->UnregisterTryCatchHandler(this);
1678 } 1693 }
(...skipping 4703 matching lines...) Expand 10 before | Expand all | Expand 10 after
6382 6397
6383 6398
6384 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 6399 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
6385 HandleScopeImplementer* scope_implementer = 6400 HandleScopeImplementer* scope_implementer =
6386 reinterpret_cast<HandleScopeImplementer*>(storage); 6401 reinterpret_cast<HandleScopeImplementer*>(storage);
6387 scope_implementer->IterateThis(v); 6402 scope_implementer->IterateThis(v);
6388 return storage + ArchiveSpacePerThread(); 6403 return storage + ArchiveSpacePerThread();
6389 } 6404 }
6390 6405
6391 } } // namespace v8::internal 6406 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/factory.h » ('j') | src/factory.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698