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

Unified Diff: runtime/vm/snapshot.cc

Issue 834233003: Fix for issue 21398 (only send "literal like" objects across isolates spawned using spawnURI (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/snapshot.cc
===================================================================
--- runtime/vm/snapshot.cc (revision 42669)
+++ runtime/vm/snapshot.cc (working copy)
@@ -1039,16 +1039,18 @@
SnapshotWriter::SnapshotWriter(Snapshot::Kind kind,
uint8_t** buffer,
ReAlloc alloc,
- intptr_t initial_size)
- : BaseWriter(buffer, alloc, initial_size),
- kind_(kind),
- isolate_(Isolate::Current()),
- object_store_(isolate_->object_store()),
- class_table_(isolate_->class_table()),
- forward_list_(kMaxPredefinedObjectIds),
- exception_type_(Exceptions::kNone),
- exception_msg_(NULL),
- unmarked_objects_(false) {
+ intptr_t initial_size,
+ bool can_send_any_object) :
Ivan Posva 2015/01/12 05:50:04 Formatting is off. Foo::Foo(param) : first_(1)
siva 2015/01/12 21:41:13 Fixed.
+ BaseWriter(buffer, alloc, initial_size),
+ kind_(kind),
+ isolate_(Isolate::Current()),
+ object_store_(isolate_->object_store()),
+ class_table_(isolate_->class_table()),
+ forward_list_(kMaxPredefinedObjectIds),
+ exception_type_(Exceptions::kNone),
+ exception_msg_(NULL),
+ unmarked_objects_(false),
+ can_send_any_object_(can_send_any_object) {
}
@@ -1708,9 +1710,15 @@
}
+bool SnapshotWriter::AllowObjectsInDartLibrary(RawLibrary* library) {
+ return (library == object_store()->collection_library() ||
+ library == object_store()->typed_data_library());
+}
+
+
void SnapshotWriter::ThrowException(Exceptions::ExceptionType type,
const char* msg) {
- isolate()->object_store()->clear_sticky_error();
+ object_store()->clear_sticky_error();
UnmarkAll();
if (msg != NULL) {
const String& msg_obj = String::Handle(String::New(msg));

Powered by Google App Engine
This is Rietveld 408576698