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

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

Issue 10196013: Make Isolate::GetData and Isolate::SetData inlineable. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix presubmit failure in test case. Created 8 years, 8 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 | « src/api.cc ('k') | 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 16486 matching lines...) Expand 10 before | Expand all | Expand 10 after
16497 CHECK_EQ(5, fatal_error_callback_counter); 16497 CHECK_EQ(5, fatal_error_callback_counter);
16498 CHECK(v8::True().IsEmpty()); 16498 CHECK(v8::True().IsEmpty());
16499 CHECK_EQ(6, fatal_error_callback_counter); 16499 CHECK_EQ(6, fatal_error_callback_counter);
16500 CHECK(v8::True(isolate).IsEmpty()); 16500 CHECK(v8::True(isolate).IsEmpty());
16501 CHECK_EQ(7, fatal_error_callback_counter); 16501 CHECK_EQ(7, fatal_error_callback_counter);
16502 CHECK(v8::False().IsEmpty()); 16502 CHECK(v8::False().IsEmpty());
16503 CHECK_EQ(8, fatal_error_callback_counter); 16503 CHECK_EQ(8, fatal_error_callback_counter);
16504 CHECK(v8::False(isolate).IsEmpty()); 16504 CHECK(v8::False(isolate).IsEmpty());
16505 CHECK_EQ(9, fatal_error_callback_counter); 16505 CHECK_EQ(9, fatal_error_callback_counter);
16506 } 16506 }
16507
16508
16509 TEST(IsolateEmbedderData) {
16510 v8::Isolate* isolate = v8::Isolate::GetCurrent();
16511 CHECK_EQ(NULL, isolate->GetData());
16512 CHECK_EQ(NULL, ISOLATE->GetData());
16513 static void* data1 = reinterpret_cast<void*>(0xacce55ed);
16514 isolate->SetData(data1);
16515 CHECK_EQ(data1, isolate->GetData());
16516 CHECK_EQ(data1, ISOLATE->GetData());
16517 static void* data2 = reinterpret_cast<void*>(0xdecea5ed);
16518 ISOLATE->SetData(data2);
16519 CHECK_EQ(data2, isolate->GetData());
16520 CHECK_EQ(data2, ISOLATE->GetData());
16521 ISOLATE->TearDown();
16522 CHECK_EQ(data2, isolate->GetData());
16523 CHECK_EQ(data2, ISOLATE->GetData());
16524 }
OLDNEW
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698