| 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 4683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4694 | 4694 |
| 4695 static void RequestInterrupt(const v8::FunctionCallbackInfo<v8::Value>& args) { | 4695 static void RequestInterrupt(const v8::FunctionCallbackInfo<v8::Value>& args) { |
| 4696 CcTest::isolate()->RequestInterrupt(&InterruptCallback357137, NULL); | 4696 CcTest::isolate()->RequestInterrupt(&InterruptCallback357137, NULL); |
| 4697 } | 4697 } |
| 4698 | 4698 |
| 4699 | 4699 |
| 4700 TEST(Regress357137) { | 4700 TEST(Regress357137) { |
| 4701 CcTest::InitializeVM(); | 4701 CcTest::InitializeVM(); |
| 4702 v8::Isolate* isolate = CcTest::isolate(); | 4702 v8::Isolate* isolate = CcTest::isolate(); |
| 4703 v8::HandleScope hscope(isolate); | 4703 v8::HandleScope hscope(isolate); |
| 4704 v8::Handle<v8::ObjectTemplate> global =v8::ObjectTemplate::New(isolate); | 4704 v8::Handle<v8::ObjectTemplate> global = v8::ObjectTemplate::New(isolate); |
| 4705 global->Set(v8::String::NewFromUtf8(isolate, "interrupt"), | 4705 global->Set(v8::String::NewFromUtf8(isolate, "interrupt"), |
| 4706 v8::FunctionTemplate::New(isolate, RequestInterrupt)); | 4706 v8::FunctionTemplate::New(isolate, RequestInterrupt)); |
| 4707 v8::Local<v8::Context> context = v8::Context::New(isolate, NULL, global); | 4707 v8::Local<v8::Context> context = v8::Context::New(isolate, NULL, global); |
| 4708 DCHECK(!context.IsEmpty()); | 4708 DCHECK(!context.IsEmpty()); |
| 4709 v8::Context::Scope cscope(context); | 4709 v8::Context::Scope cscope(context); |
| 4710 | 4710 |
| 4711 v8::Local<v8::Value> result = CompileRun( | 4711 v8::Local<v8::Value> result = CompileRun( |
| 4712 "var locals = '';" | 4712 "var locals = '';" |
| 4713 "for (var i = 0; i < 512; i++) locals += 'var v' + i + '= 42;';" | 4713 "for (var i = 0; i < 512; i++) locals += 'var v' + i + '= 42;';" |
| 4714 "eval('function f() {' + locals + 'return function() { return v0; }; }');" | 4714 "eval('function f() {' + locals + 'return function() { return v0; }; }');" |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4926 #ifdef DEBUG | 4926 #ifdef DEBUG |
| 4927 TEST(PathTracer) { | 4927 TEST(PathTracer) { |
| 4928 CcTest::InitializeVM(); | 4928 CcTest::InitializeVM(); |
| 4929 v8::HandleScope scope(CcTest::isolate()); | 4929 v8::HandleScope scope(CcTest::isolate()); |
| 4930 | 4930 |
| 4931 v8::Local<v8::Value> result = CompileRun("'abc'"); | 4931 v8::Local<v8::Value> result = CompileRun("'abc'"); |
| 4932 Handle<Object> o = v8::Utils::OpenHandle(*result); | 4932 Handle<Object> o = v8::Utils::OpenHandle(*result); |
| 4933 CcTest::i_isolate()->heap()->TracePathToObject(*o); | 4933 CcTest::i_isolate()->heap()->TracePathToObject(*o); |
| 4934 } | 4934 } |
| 4935 #endif // DEBUG | 4935 #endif // DEBUG |
| OLD | NEW |