Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Side by Side Diff: test/cctest/test-debug.cc

Issue 6614010: [Isolates] Merge 6700:7030 from bleeding_edge to isolates. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-cpu-profiler.cc ('k') | test/cctest/test-decls.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // Expose the debug context global object in the global object for testing. 147 // Expose the debug context global object in the global object for testing.
148 debug->Load(); 148 debug->Load();
149 debug->debug_context()->set_security_token( 149 debug->debug_context()->set_security_token(
150 v8::Utils::OpenHandle(*context_)->security_token()); 150 v8::Utils::OpenHandle(*context_)->security_token());
151 151
152 Handle<JSGlobalProxy> global(Handle<JSGlobalProxy>::cast( 152 Handle<JSGlobalProxy> global(Handle<JSGlobalProxy>::cast(
153 v8::Utils::OpenHandle(*context_->Global()))); 153 v8::Utils::OpenHandle(*context_->Global())));
154 Handle<v8::internal::String> debug_string = 154 Handle<v8::internal::String> debug_string =
155 FACTORY->LookupAsciiSymbol("debug"); 155 FACTORY->LookupAsciiSymbol("debug");
156 SetProperty(global, debug_string, 156 SetProperty(global, debug_string,
157 Handle<Object>(debug->debug_context()->global_proxy()), DONT_ENUM); 157 Handle<Object>(debug->debug_context()->global_proxy()), DONT_ENUM,
158 ::v8::internal::kNonStrictMode);
158 } 159 }
159 private: 160 private:
160 v8::Persistent<v8::Context> context_; 161 v8::Persistent<v8::Context> context_;
161 }; 162 };
162 163
163 164
164 // --- H e l p e r F u n c t i o n s 165 // --- H e l p e r F u n c t i o n s
165 166
166 167
167 // Compile and run the supplied source and return the fequested function. 168 // Compile and run the supplied source and return the fequested function.
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 DebugLocalContext env; 1013 DebugLocalContext env;
1013 1014
1014 CheckDebugBreakFunction(&env, 1015 CheckDebugBreakFunction(&env,
1015 "function f1(){}", "f1", 1016 "function f1(){}", "f1",
1016 0, 1017 0,
1017 v8::internal::RelocInfo::JS_RETURN, 1018 v8::internal::RelocInfo::JS_RETURN,
1018 NULL); 1019 NULL);
1019 CheckDebugBreakFunction(&env, 1020 CheckDebugBreakFunction(&env,
1020 "function f2(){x=1;}", "f2", 1021 "function f2(){x=1;}", "f2",
1021 0, 1022 0,
1022 v8::internal::RelocInfo::CODE_TARGET, 1023 v8::internal::RelocInfo::CODE_TARGET_CONTEXT,
1023 Isolate::Current()->builtins()->builtin( 1024 Isolate::Current()->builtins()->builtin(
1024 Builtins::StoreIC_DebugBreak)); 1025 Builtins::StoreIC_DebugBreak));
1025 CheckDebugBreakFunction(&env, 1026 CheckDebugBreakFunction(&env,
1026 "function f3(){var a=x;}", "f3", 1027 "function f3(){var a=x;}", "f3",
1027 0, 1028 0,
1028 v8::internal::RelocInfo::CODE_TARGET_CONTEXT, 1029 v8::internal::RelocInfo::CODE_TARGET_CONTEXT,
1029 Isolate::Current()->builtins()->builtin( 1030 Isolate::Current()->builtins()->builtin(
1030 Builtins::LoadIC_DebugBreak)); 1031 Builtins::LoadIC_DebugBreak));
1031 1032
1032 // TODO(1240753): Make the test architecture independent or split 1033 // TODO(1240753): Make the test architecture independent or split
(...skipping 6213 matching lines...) Expand 10 before | Expand all | Expand 10 after
7246 TestDebugBreakInLoop("for (;;) {", loop_bodies, "}"); 7247 TestDebugBreakInLoop("for (;;) {", loop_bodies, "}");
7247 TestDebugBreakInLoop("for (;a == 1;) {", loop_bodies, "}"); 7248 TestDebugBreakInLoop("for (;a == 1;) {", loop_bodies, "}");
7248 7249
7249 // Get rid of the debug event listener. 7250 // Get rid of the debug event listener.
7250 v8::Debug::SetDebugEventListener(NULL); 7251 v8::Debug::SetDebugEventListener(NULL);
7251 CheckDebuggerUnloaded(); 7252 CheckDebuggerUnloaded();
7252 } 7253 }
7253 7254
7254 7255
7255 #endif // ENABLE_DEBUGGER_SUPPORT 7256 #endif // ENABLE_DEBUGGER_SUPPORT
OLDNEW
« no previous file with comments | « test/cctest/test-cpu-profiler.cc ('k') | test/cctest/test-decls.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698