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 14623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14634 } | 14634 } |
14635 two_byte_content_[14] = 'b'; | 14635 two_byte_content_[14] = 'b'; |
14636 | 14636 |
14637 // Create the input string for the regexp - the one we are going to change | 14637 // Create the input string for the regexp - the one we are going to change |
14638 // properties of. | 14638 // properties of. |
14639 input_ = factory->NewExternalStringFromAscii(&ascii_resource_); | 14639 input_ = factory->NewExternalStringFromAscii(&ascii_resource_); |
14640 | 14640 |
14641 // Inject the input as a global variable. | 14641 // Inject the input as a global variable. |
14642 i::Handle<i::String> input_name = | 14642 i::Handle<i::String> input_name = |
14643 factory->NewStringFromAscii(i::Vector<const char>("input", 5)); | 14643 factory->NewStringFromAscii(i::Vector<const char>("input", 5)); |
14644 i::Isolate::Current()->native_context()->global_object()->SetProperty( | 14644 i::JSReceiver::SetProperty( |
14645 *input_name, | 14645 i::handle(i::Isolate::Current()->native_context()->global_object()), |
14646 *input_, | 14646 input_name, |
| 14647 input_, |
14647 NONE, | 14648 NONE, |
14648 i::kNonStrictMode)->ToObjectChecked(); | 14649 i::kNonStrictMode); |
14649 | 14650 |
14650 MorphThread morph_thread(this); | 14651 MorphThread morph_thread(this); |
14651 morph_thread.Start(); | 14652 morph_thread.Start(); |
14652 v8::Locker::StartPreemption(1); | 14653 v8::Locker::StartPreemption(1); |
14653 LongRunningRegExp(); | 14654 LongRunningRegExp(); |
14654 { | 14655 { |
14655 v8::Unlocker unlock(CcTest::default_isolate()); | 14656 v8::Unlocker unlock(CcTest::default_isolate()); |
14656 morph_thread.Join(); | 14657 morph_thread.Join(); |
14657 } | 14658 } |
14658 v8::Locker::StopPreemption(); | 14659 v8::Locker::StopPreemption(); |
(...skipping 5921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20580 // Verify function not cached | 20581 // Verify function not cached |
20581 int serial_number = | 20582 int serial_number = |
20582 i::Smi::cast(v8::Utils::OpenHandle(*func) | 20583 i::Smi::cast(v8::Utils::OpenHandle(*func) |
20583 ->shared()->get_api_func_data()->serial_number())->value(); | 20584 ->shared()->get_api_func_data()->serial_number())->value(); |
20584 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); | 20585 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
20585 i::Object* elm = i_isolate->native_context()->function_cache() | 20586 i::Object* elm = i_isolate->native_context()->function_cache() |
20586 ->GetElementNoExceptionThrown(i_isolate, serial_number); | 20587 ->GetElementNoExceptionThrown(i_isolate, serial_number); |
20587 CHECK(elm->IsNull()); | 20588 CHECK(elm->IsNull()); |
20588 } | 20589 } |
20589 | 20590 |
OLD | NEW |