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

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

Issue 6594037: Strict Mode assignment to read only property. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: CR Feedback. 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 | « src/x64/virtual-frame-x64.cc ('k') | test/cctest/test-compiler.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 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 10073 matching lines...) Expand 10 before | Expand all | Expand 10 after
10084 } 10084 }
10085 two_byte_content_[14] = 'b'; 10085 two_byte_content_[14] = 'b';
10086 10086
10087 // Create the input string for the regexp - the one we are going to change 10087 // Create the input string for the regexp - the one we are going to change
10088 // properties of. 10088 // properties of.
10089 input_ = i::Factory::NewExternalStringFromAscii(&ascii_resource_); 10089 input_ = i::Factory::NewExternalStringFromAscii(&ascii_resource_);
10090 10090
10091 // Inject the input as a global variable. 10091 // Inject the input as a global variable.
10092 i::Handle<i::String> input_name = 10092 i::Handle<i::String> input_name =
10093 i::Factory::NewStringFromAscii(i::Vector<const char>("input", 5)); 10093 i::Factory::NewStringFromAscii(i::Vector<const char>("input", 5));
10094 i::Top::global_context()->global()->SetProperty(*input_name, 10094 i::Top::global_context()->global()->SetProperty(
10095 *input_, 10095 *input_name,
10096 NONE)->ToObjectChecked(); 10096 *input_,
10097 10097 NONE,
10098 i::kNonStrictMode)->ToObjectChecked();
10098 10099
10099 MorphThread morph_thread(this); 10100 MorphThread morph_thread(this);
10100 morph_thread.Start(); 10101 morph_thread.Start();
10101 v8::Locker::StartPreemption(1); 10102 v8::Locker::StartPreemption(1);
10102 LongRunningRegExp(); 10103 LongRunningRegExp();
10103 { 10104 {
10104 v8::Unlocker unlock; 10105 v8::Unlocker unlock;
10105 morph_thread.Join(); 10106 morph_thread.Join();
10106 } 10107 }
10107 v8::Locker::StopPreemption(); 10108 v8::Locker::StopPreemption();
(...skipping 2775 matching lines...) Expand 10 before | Expand all | Expand 10 after
12883 v8::Handle<v8::Function> define_property = 12884 v8::Handle<v8::Function> define_property =
12884 CompileRun("(function() {" 12885 CompileRun("(function() {"
12885 " Object.defineProperty(" 12886 " Object.defineProperty("
12886 " this," 12887 " this,"
12887 " 1," 12888 " 1,"
12888 " { configurable: true, enumerable: true, value: 3 });" 12889 " { configurable: true, enumerable: true, value: 3 });"
12889 "})").As<Function>(); 12890 "})").As<Function>();
12890 context->DetachGlobal(); 12891 context->DetachGlobal();
12891 define_property->Call(proxy, 0, NULL); 12892 define_property->Call(proxy, 0, NULL);
12892 } 12893 }
OLDNEW
« no previous file with comments | « src/x64/virtual-frame-x64.cc ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698