| 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 19335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19346 "s(o);"); | 19346 "s(o);"); |
| 19347 CHECK(try_catch.HasCaught()); | 19347 CHECK(try_catch.HasCaught()); |
| 19348 v8::String::Utf8Value value(try_catch.Exception()); | 19348 v8::String::Utf8Value value(try_catch.Exception()); |
| 19349 CHECK_EQ(0, strcmp(*value, "Hey!")); | 19349 CHECK_EQ(0, strcmp(*value, "Hey!")); |
| 19350 } | 19350 } |
| 19351 | 19351 |
| 19352 | 19352 |
| 19353 TEST(Regress528) { | 19353 TEST(Regress528) { |
| 19354 v8::V8::Initialize(); | 19354 v8::V8::Initialize(); |
| 19355 v8::Isolate* isolate = CcTest::isolate(); | 19355 v8::Isolate* isolate = CcTest::isolate(); |
| 19356 i::FLAG_retain_maps_for_n_gc = 0; |
| 19356 v8::HandleScope scope(isolate); | 19357 v8::HandleScope scope(isolate); |
| 19357 v8::Local<Context> other_context; | 19358 v8::Local<Context> other_context; |
| 19358 int gc_count; | 19359 int gc_count; |
| 19359 | 19360 |
| 19360 // Create a context used to keep the code from aging in the compilation | 19361 // Create a context used to keep the code from aging in the compilation |
| 19361 // cache. | 19362 // cache. |
| 19362 other_context = Context::New(isolate); | 19363 other_context = Context::New(isolate); |
| 19363 | 19364 |
| 19364 // Context-dependent context data creates reference from the compilation | 19365 // Context-dependent context data creates reference from the compilation |
| 19365 // cache to the global object. | 19366 // cache to the global object. |
| (...skipping 5272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 24638 TEST(ClassPrototypeCreationContext) { | 24639 TEST(ClassPrototypeCreationContext) { |
| 24639 i::FLAG_harmony_classes = true; | 24640 i::FLAG_harmony_classes = true; |
| 24640 v8::Isolate* isolate = CcTest::isolate(); | 24641 v8::Isolate* isolate = CcTest::isolate(); |
| 24641 v8::HandleScope handle_scope(isolate); | 24642 v8::HandleScope handle_scope(isolate); |
| 24642 LocalContext env; | 24643 LocalContext env; |
| 24643 | 24644 |
| 24644 Handle<Object> result = Handle<Object>::Cast( | 24645 Handle<Object> result = Handle<Object>::Cast( |
| 24645 CompileRun("'use strict'; class Example { }; Example.prototype")); | 24646 CompileRun("'use strict'; class Example { }; Example.prototype")); |
| 24646 CHECK(env.local() == result->CreationContext()); | 24647 CHECK(env.local() == result->CreationContext()); |
| 24647 } | 24648 } |
| OLD | NEW |