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

Side by Side Diff: test/cctest/test-serialize.cc

Issue 643873004: Fix ASAN warning. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2007-2010 the V8 project authors. All rights reserved. 1 // Copyright 2007-2010 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 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 CHECK(heap->InSpace(*v8::Utils::OpenHandle(*CompileRun("a")->ToString()), 941 CHECK(heap->InSpace(*v8::Utils::OpenHandle(*CompileRun("a")->ToString()),
942 OLD_DATA_SPACE)); 942 OLD_DATA_SPACE));
943 CHECK(heap->InSpace(*v8::Utils::OpenHandle(*CompileRun("b")->ToString()), 943 CHECK(heap->InSpace(*v8::Utils::OpenHandle(*CompileRun("b")->ToString()),
944 OLD_DATA_SPACE)); 944 OLD_DATA_SPACE));
945 CHECK(heap->InSpace(*v8::Utils::OpenHandle(*CompileRun("c")->ToString()), 945 CHECK(heap->InSpace(*v8::Utils::OpenHandle(*CompileRun("c")->ToString()),
946 OLD_DATA_SPACE)); 946 OLD_DATA_SPACE));
947 947
948 delete cache; 948 delete cache;
949 source_a.Dispose(); 949 source_a.Dispose();
950 source_b.Dispose(); 950 source_b.Dispose();
951 source_c.Dispose();
951 } 952 }
952 953
953 954
954 class SerializerOneByteResource 955 class SerializerOneByteResource
955 : public v8::String::ExternalOneByteStringResource { 956 : public v8::String::ExternalOneByteStringResource {
956 public: 957 public:
957 SerializerOneByteResource(const char* data, size_t length) 958 SerializerOneByteResource(const char* data, size_t length)
958 : data_(data), length_(length) {} 959 : data_(data), length_(length) {}
959 virtual const char* data() const { return data_; } 960 virtual const char* data() const { return data_; }
960 virtual size_t length() const { return length_; } 961 virtual size_t length() const { return length_; }
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
1205 { 1206 {
1206 DisallowCompilation no_compile(reinterpret_cast<Isolate*>(isolate2)); 1207 DisallowCompilation no_compile(reinterpret_cast<Isolate*>(isolate2));
1207 script = v8::ScriptCompiler::CompileUnbound( 1208 script = v8::ScriptCompiler::CompileUnbound(
1208 isolate2, &source, v8::ScriptCompiler::kConsumeCodeCache); 1209 isolate2, &source, v8::ScriptCompiler::kConsumeCodeCache);
1209 } 1210 }
1210 v8::Local<v8::Value> result = script->BindToCurrentContext()->Run(); 1211 v8::Local<v8::Value> result = script->BindToCurrentContext()->Run();
1211 CHECK(result->ToString()->Equals(v8_str("abcdef"))); 1212 CHECK(result->ToString()->Equals(v8_str("abcdef")));
1212 } 1213 }
1213 isolate2->Dispose(); 1214 isolate2->Dispose();
1214 } 1215 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698