| 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 1697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1708 v8::ScriptOrigin origin = | 1708 v8::ScriptOrigin origin = |
| 1709 v8::ScriptOrigin(v8::String::New("test")); | 1709 v8::ScriptOrigin(v8::String::New("test")); |
| 1710 v8::Local<v8::Script> script = v8::Script::Compile(source, &origin); | 1710 v8::Local<v8::Script> script = v8::Script::Compile(source, &origin); |
| 1711 script->Run(); | 1711 script->Run(); |
| 1712 v8::Local<v8::Function> f = | 1712 v8::Local<v8::Function> f = |
| 1713 v8::Local<v8::Function>::Cast(env->Global()->Get(v8::String::New("f"))); | 1713 v8::Local<v8::Function>::Cast(env->Global()->Get(v8::String::New("f"))); |
| 1714 v8::Local<v8::Function> g = | 1714 v8::Local<v8::Function> g = |
| 1715 v8::Local<v8::Function>::Cast(env->Global()->Get(v8::String::New("g"))); | 1715 v8::Local<v8::Function>::Cast(env->Global()->Get(v8::String::New("g"))); |
| 1716 | 1716 |
| 1717 // Get the script id knowing that internally it is a 32 integer. | 1717 // Get the script id knowing that internally it is a 32 integer. |
| 1718 uint32_t script_id = script->Id()->Uint32Value(); | 1718 uint32_t script_id = script->GetId(); |
| 1719 | 1719 |
| 1720 // Call f and g without break points. | 1720 // Call f and g without break points. |
| 1721 break_point_hit_count = 0; | 1721 break_point_hit_count = 0; |
| 1722 f->Call(env->Global(), 0, NULL); | 1722 f->Call(env->Global(), 0, NULL); |
| 1723 CHECK_EQ(0, break_point_hit_count); | 1723 CHECK_EQ(0, break_point_hit_count); |
| 1724 g->Call(env->Global(), 0, NULL); | 1724 g->Call(env->Global(), 0, NULL); |
| 1725 CHECK_EQ(0, break_point_hit_count); | 1725 CHECK_EQ(0, break_point_hit_count); |
| 1726 | 1726 |
| 1727 // Call f and g with break point on line 12. | 1727 // Call f and g with break point on line 12. |
| 1728 int sbp1 = SetScriptBreakPointByIdFromJS(script_id, 12, 0); | 1728 int sbp1 = SetScriptBreakPointByIdFromJS(script_id, 12, 0); |
| (...skipping 5843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7572 TEST(LiveEditDisabled) { | 7572 TEST(LiveEditDisabled) { |
| 7573 v8::internal::FLAG_allow_natives_syntax = true; | 7573 v8::internal::FLAG_allow_natives_syntax = true; |
| 7574 LocalContext env; | 7574 LocalContext env; |
| 7575 v8::HandleScope scope(env->GetIsolate()); | 7575 v8::HandleScope scope(env->GetIsolate()); |
| 7576 v8::Debug::SetLiveEditEnabled(false); | 7576 v8::Debug::SetLiveEditEnabled(false); |
| 7577 CompileRun("%LiveEditCompareStrings('', '')"); | 7577 CompileRun("%LiveEditCompareStrings('', '')"); |
| 7578 } | 7578 } |
| 7579 | 7579 |
| 7580 | 7580 |
| 7581 #endif // ENABLE_DEBUGGER_SUPPORT | 7581 #endif // ENABLE_DEBUGGER_SUPPORT |
| OLD | NEW |