| 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 16217 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  16228       "s(o);"); |  16228       "s(o);"); | 
|  16229   CHECK(try_catch.HasCaught()); |  16229   CHECK(try_catch.HasCaught()); | 
|  16230   v8::String::Utf8Value value(try_catch.Exception()); |  16230   v8::String::Utf8Value value(try_catch.Exception()); | 
|  16231   CHECK_EQ(0, strcmp(*value, "Hey!")); |  16231   CHECK_EQ(0, strcmp(*value, "Hey!")); | 
|  16232 } |  16232 } | 
|  16233  |  16233  | 
|  16234  |  16234  | 
|  16235 TEST(Regress528) { |  16235 TEST(Regress528) { | 
|  16236   v8::V8::Initialize(); |  16236   v8::V8::Initialize(); | 
|  16237   v8::Isolate* isolate = CcTest::isolate(); |  16237   v8::Isolate* isolate = CcTest::isolate(); | 
 |  16238   i::FLAG_retain_maps_for_n_gc = 0; | 
|  16238   v8::HandleScope scope(isolate); |  16239   v8::HandleScope scope(isolate); | 
|  16239   v8::Local<Context> other_context; |  16240   v8::Local<Context> other_context; | 
|  16240   int gc_count; |  16241   int gc_count; | 
|  16241  |  16242  | 
|  16242   // Create a context used to keep the code from aging in the compilation |  16243   // Create a context used to keep the code from aging in the compilation | 
|  16243   // cache. |  16244   // cache. | 
|  16244   other_context = Context::New(isolate); |  16245   other_context = Context::New(isolate); | 
|  16245  |  16246  | 
|  16246   // Context-dependent context data creates reference from the compilation |  16247   // Context-dependent context data creates reference from the compilation | 
|  16247   // cache to the global object. |  16248   // cache to the global object. | 
| (...skipping 5389 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  21637   } |  21638   } | 
|  21638   { |  21639   { | 
|  21639     v8::TryCatch try_catch; |  21640     v8::TryCatch try_catch; | 
|  21640     uint16_t* data = reinterpret_cast<uint16_t*>(buffer); |  21641     uint16_t* data = reinterpret_cast<uint16_t*>(buffer); | 
|  21641     CHECK(v8::String::NewFromTwoByte(isolate, data, v8::String::kNormalString, |  21642     CHECK(v8::String::NewFromTwoByte(isolate, data, v8::String::kNormalString, | 
|  21642                                      length).IsEmpty()); |  21643                                      length).IsEmpty()); | 
|  21643     CHECK(try_catch.HasCaught()); |  21644     CHECK(try_catch.HasCaught()); | 
|  21644   } |  21645   } | 
|  21645   free(buffer); |  21646   free(buffer); | 
|  21646 } |  21647 } | 
| OLD | NEW |