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

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

Issue 9163003: Fix GCC4.7 compilation warning introduced in r10400 (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 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 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 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 13707 matching lines...) Expand 10 before | Expand all | Expand 10 after
13718 TEST(VisitExternalStrings) { 13718 TEST(VisitExternalStrings) {
13719 v8::HandleScope scope; 13719 v8::HandleScope scope;
13720 LocalContext env; 13720 LocalContext env;
13721 const char* string = "Some string"; 13721 const char* string = "Some string";
13722 uint16_t* two_byte_string = AsciiToTwoByteString(string); 13722 uint16_t* two_byte_string = AsciiToTwoByteString(string);
13723 TestResource* resource1 = new TestResource(two_byte_string); 13723 TestResource* resource1 = new TestResource(two_byte_string);
13724 v8::Local<v8::String> string1 = v8::String::NewExternal(resource1); 13724 v8::Local<v8::String> string1 = v8::String::NewExternal(resource1);
13725 TestResource* resource2 = new TestResource(two_byte_string); 13725 TestResource* resource2 = new TestResource(two_byte_string);
13726 v8::Local<v8::String> string2 = v8::String::NewExternal(resource2); 13726 v8::Local<v8::String> string2 = v8::String::NewExternal(resource2);
13727 13727
13728 // We need to add usages for string1 and string2 to avoid warnings in GCC 4.7
13729 CHECK(string1->IsExternal());
13730 CHECK(string2->IsExternal());
13731
13728 VisitorImpl visitor(resource1, resource2); 13732 VisitorImpl visitor(resource1, resource2);
13729 v8::V8::VisitExternalResources(&visitor); 13733 v8::V8::VisitExternalResources(&visitor);
13730 visitor.CheckVisitedResources(); 13734 visitor.CheckVisitedResources();
13731 } 13735 }
13732 13736
13733 13737
13734 static double DoubleFromBits(uint64_t value) { 13738 static double DoubleFromBits(uint64_t value) {
13735 double target; 13739 double target;
13736 memcpy(&target, &value, sizeof(target)); 13740 memcpy(&target, &value, sizeof(target));
13737 return target; 13741 return target;
(...skipping 2142 matching lines...) Expand 10 before | Expand all | Expand 10 after
15880 CompileRun("throw 'exception';"); 15884 CompileRun("throw 'exception';");
15881 } 15885 }
15882 15886
15883 15887
15884 TEST(CallCompletedCallbackTwoExceptions) { 15888 TEST(CallCompletedCallbackTwoExceptions) {
15885 v8::HandleScope scope; 15889 v8::HandleScope scope;
15886 LocalContext env; 15890 LocalContext env;
15887 v8::V8::AddCallCompletedCallback(CallCompletedCallbackException); 15891 v8::V8::AddCallCompletedCallback(CallCompletedCallbackException);
15888 CompileRun("throw 'first exception';"); 15892 CompileRun("throw 'first exception';");
15889 } 15893 }
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