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

Unified Diff: runtime/vm/snapshot.h

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
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot.h
===================================================================
--- runtime/vm/snapshot.h (revision 42788)
+++ runtime/vm/snapshot.h (working copy)
@@ -568,7 +568,8 @@
SnapshotWriter(Snapshot::Kind kind,
uint8_t** buffer,
ReAlloc alloc,
- intptr_t initial_size);
+ intptr_t initial_size,
+ bool can_send_any_object);
public:
// Snapshot kind.
@@ -589,6 +590,7 @@
void set_exception_msg(const char* msg) {
exception_msg_ = msg;
}
+ bool can_send_any_object() const { return can_send_any_object_; }
void ThrowException(Exceptions::ExceptionType type, const char* msg);
// Write a version string for the snapshot.
@@ -623,6 +625,7 @@
RawClass* cls,
intptr_t tags);
void WriteInstanceRef(RawObject* raw, RawClass* cls);
+ bool AllowObjectsInDartLibrary(RawLibrary* library);
Isolate* isolate() const { return isolate_; }
ObjectStore* object_store() const { return object_store_; }
@@ -636,6 +639,7 @@
Exceptions::ExceptionType exception_type_; // Exception type.
const char* exception_msg_; // Message associated with exception.
bool unmarked_objects_; // True if marked objects have been unmarked.
+ bool can_send_any_object_; // True if any Dart instance can be sent.
friend class RawArray;
friend class RawClass;
@@ -663,7 +667,7 @@
public:
static const intptr_t kInitialSize = 64 * KB;
FullSnapshotWriter(uint8_t** buffer, ReAlloc alloc)
- : SnapshotWriter(Snapshot::kFull, buffer, alloc, kInitialSize) {
+ : SnapshotWriter(Snapshot::kFull, buffer, alloc, kInitialSize, true) {
ASSERT(buffer != NULL);
ASSERT(alloc != NULL);
}
@@ -681,7 +685,7 @@
public:
static const intptr_t kInitialSize = 64 * KB;
ScriptSnapshotWriter(uint8_t** buffer, ReAlloc alloc)
- : SnapshotWriter(Snapshot::kScript, buffer, alloc, kInitialSize) {
+ : SnapshotWriter(Snapshot::kScript, buffer, alloc, kInitialSize, true) {
ASSERT(buffer != NULL);
ASSERT(alloc != NULL);
}
@@ -698,8 +702,12 @@
class MessageWriter : public SnapshotWriter {
public:
static const intptr_t kInitialSize = 512;
- MessageWriter(uint8_t** buffer, ReAlloc alloc)
- : SnapshotWriter(Snapshot::kMessage, buffer, alloc, kInitialSize) {
+ MessageWriter(uint8_t** buffer, ReAlloc alloc, bool can_send_any_object)
+ : SnapshotWriter(Snapshot::kMessage,
+ buffer,
+ alloc,
+ kInitialSize,
+ can_send_any_object) {
ASSERT(buffer != NULL);
ASSERT(alloc != NULL);
}
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698