| OLD | NEW |
| 1 // Copyright 2007-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2009 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 10026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10037 | 10037 |
| 10038 // Create the input string for the regexp - the one we are going to change | 10038 // Create the input string for the regexp - the one we are going to change |
| 10039 // properties of. | 10039 // properties of. |
| 10040 input_ = i::Factory::NewExternalStringFromAscii(&ascii_resource_); | 10040 input_ = i::Factory::NewExternalStringFromAscii(&ascii_resource_); |
| 10041 | 10041 |
| 10042 // Inject the input as a global variable. | 10042 // Inject the input as a global variable. |
| 10043 i::Handle<i::String> input_name = | 10043 i::Handle<i::String> input_name = |
| 10044 i::Factory::NewStringFromAscii(i::Vector<const char>("input", 5)); | 10044 i::Factory::NewStringFromAscii(i::Vector<const char>("input", 5)); |
| 10045 i::Top::global_context()->global()->SetProperty(*input_name, | 10045 i::Top::global_context()->global()->SetProperty(*input_name, |
| 10046 *input_, | 10046 *input_, |
| 10047 NONE)->ToObjectChecked(); | 10047 NONE, |
| 10048 i::kNonStrictMode)->ToObject
Checked(); |
| 10048 | 10049 |
| 10049 | 10050 |
| 10050 MorphThread morph_thread(this); | 10051 MorphThread morph_thread(this); |
| 10051 morph_thread.Start(); | 10052 morph_thread.Start(); |
| 10052 v8::Locker::StartPreemption(1); | 10053 v8::Locker::StartPreemption(1); |
| 10053 LongRunningRegExp(); | 10054 LongRunningRegExp(); |
| 10054 { | 10055 { |
| 10055 v8::Unlocker unlock; | 10056 v8::Unlocker unlock; |
| 10056 morph_thread.Join(); | 10057 morph_thread.Join(); |
| 10057 } | 10058 } |
| (...skipping 2776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12834 v8::Handle<v8::Function> define_property = | 12835 v8::Handle<v8::Function> define_property = |
| 12835 CompileRun("(function() {" | 12836 CompileRun("(function() {" |
| 12836 " Object.defineProperty(" | 12837 " Object.defineProperty(" |
| 12837 " this," | 12838 " this," |
| 12838 " 1," | 12839 " 1," |
| 12839 " { configurable: true, enumerable: true, value: 3 });" | 12840 " { configurable: true, enumerable: true, value: 3 });" |
| 12840 "})").As<Function>(); | 12841 "})").As<Function>(); |
| 12841 context->DetachGlobal(); | 12842 context->DetachGlobal(); |
| 12842 define_property->Call(proxy, 0, NULL); | 12843 define_property->Call(proxy, 0, NULL); |
| 12843 } | 12844 } |
| OLD | NEW |