OLD | NEW |
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 Loading... |
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 = (void*)0xacce55ed; |
| 16514 isolate->SetData(data1); |
| 16515 CHECK_EQ(data1, isolate->GetData()); |
| 16516 CHECK_EQ(data1, ISOLATE->GetData()); |
| 16517 static void* data2 = (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 } |
OLD | NEW |