OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 | 5 |
6 // Defined when linking against shared lib on Windows. | 6 // Defined when linking against shared lib on Windows. |
7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) | 7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) |
8 #define V8_SHARED | 8 #define V8_SHARED |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 1952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1963 } | 1963 } |
1964 } | 1964 } |
1965 | 1965 |
1966 | 1966 |
1967 #ifndef V8_SHARED | 1967 #ifndef V8_SHARED |
1968 bool Shell::SerializeValue(Isolate* isolate, Handle<Value> value, | 1968 bool Shell::SerializeValue(Isolate* isolate, Handle<Value> value, |
1969 const ObjectList& to_transfer, | 1969 const ObjectList& to_transfer, |
1970 ObjectList* seen_objects, | 1970 ObjectList* seen_objects, |
1971 SerializationData* out_data) { | 1971 SerializationData* out_data) { |
1972 DCHECK(out_data); | 1972 DCHECK(out_data); |
1973 HandleScope scope(isolate); | |
1974 Local<Context> context = isolate->GetCurrentContext(); | 1973 Local<Context> context = isolate->GetCurrentContext(); |
1975 | 1974 |
1976 if (value->IsUndefined()) { | 1975 if (value->IsUndefined()) { |
1977 out_data->WriteTag(kSerializationTagUndefined); | 1976 out_data->WriteTag(kSerializationTagUndefined); |
1978 } else if (value->IsNull()) { | 1977 } else if (value->IsNull()) { |
1979 out_data->WriteTag(kSerializationTagNull); | 1978 out_data->WriteTag(kSerializationTagNull); |
1980 } else if (value->IsTrue()) { | 1979 } else if (value->IsTrue()) { |
1981 out_data->WriteTag(kSerializationTagTrue); | 1980 out_data->WriteTag(kSerializationTagTrue); |
1982 } else if (value->IsFalse()) { | 1981 } else if (value->IsFalse()) { |
1983 out_data->WriteTag(kSerializationTagFalse); | 1982 out_data->WriteTag(kSerializationTagFalse); |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2397 } | 2396 } |
2398 | 2397 |
2399 } // namespace v8 | 2398 } // namespace v8 |
2400 | 2399 |
2401 | 2400 |
2402 #ifndef GOOGLE3 | 2401 #ifndef GOOGLE3 |
2403 int main(int argc, char* argv[]) { | 2402 int main(int argc, char* argv[]) { |
2404 return v8::Shell::Main(argc, argv); | 2403 return v8::Shell::Main(argc, argv); |
2405 } | 2404 } |
2406 #endif | 2405 #endif |
OLD | NEW |