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

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

Issue 1181733002: Revert of Replace SetObjectProperty / DefineObjectProperty with less powerful alternatives where relevant. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « src/scopeinfo.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 CHECK(isolate->debug()->Load()); 108 CHECK(isolate->debug()->Load());
109 Handle<v8::internal::Context> debug_context = 109 Handle<v8::internal::Context> debug_context =
110 isolate->debug()->debug_context(); 110 isolate->debug()->debug_context();
111 debug_context->set_security_token( 111 debug_context->set_security_token(
112 v8::Utils::OpenHandle(*context_)->security_token()); 112 v8::Utils::OpenHandle(*context_)->security_token());
113 113
114 Handle<JSGlobalProxy> global(Handle<JSGlobalProxy>::cast( 114 Handle<JSGlobalProxy> global(Handle<JSGlobalProxy>::cast(
115 v8::Utils::OpenHandle(*context_->Global()))); 115 v8::Utils::OpenHandle(*context_->Global())));
116 Handle<v8::internal::String> debug_string = 116 Handle<v8::internal::String> debug_string =
117 factory->InternalizeOneByteString(STATIC_CHAR_VECTOR("debug")); 117 factory->InternalizeOneByteString(STATIC_CHAR_VECTOR("debug"));
118 v8::internal::JSObject::SetOwnPropertyIgnoreAttributes( 118 v8::internal::Runtime::DefineObjectProperty(global, debug_string,
119 global, debug_string, handle(debug_context->global_proxy()), DONT_ENUM) 119 handle(debug_context->global_proxy(), isolate), DONT_ENUM).Check();
120 .Check();
121 } 120 }
122 121
123 private: 122 private:
124 v8::HandleScope scope_; 123 v8::HandleScope scope_;
125 v8::Local<v8::Context> context_; 124 v8::Local<v8::Context> context_;
126 }; 125 };
127 126
128 127
129 // --- H e l p e r F u n c t i o n s 128 // --- H e l p e r F u n c t i o n s
130 129
(...skipping 7516 matching lines...) Expand 10 before | Expand all | Expand 10 after
7647 "let y = 2; \n" 7646 "let y = 2; \n"
7648 "debugger; \n" 7647 "debugger; \n"
7649 "x * y", 7648 "x * y",
7650 30); 7649 30);
7651 ExpectInt32( 7650 ExpectInt32(
7652 "x = 1; y = 2; \n" 7651 "x = 1; y = 2; \n"
7653 "debugger;" 7652 "debugger;"
7654 "x * y", 7653 "x * y",
7655 30); 7654 30);
7656 } 7655 }
OLDNEW
« no previous file with comments | « src/scopeinfo.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698