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

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

Issue 459413002: Support symbol-named properties in API (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Include a bit that was missing from the previous patch Created 6 years, 4 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
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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 v8::HandleScope scope(CcTest::isolate()); 99 v8::HandleScope scope(CcTest::isolate());
100 v8::Handle<v8::Context> env = v8::Context::New(CcTest::isolate()); 100 v8::Handle<v8::Context> env = v8::Context::New(CcTest::isolate());
101 env->Enter(); 101 env->Enter();
102 Handle<Object> o = Test(); 102 Handle<Object> o = Test();
103 CHECK(o->IsSmi() && Smi::cast(*o)->value() == 42); 103 CHECK(o->IsSmi() && Smi::cast(*o)->value() == 42);
104 env->Exit(); 104 env->Exit();
105 } 105 }
106 106
107 107
108 void TestGetter( 108 void TestGetter(
109 v8::Local<v8::String> name, 109 v8::Local<v8::Name> name,
110 const v8::PropertyCallbackInfo<v8::Value>& info) { 110 const v8::PropertyCallbackInfo<v8::Value>& info) {
111 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate()); 111 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
112 HandleScope scope(isolate); 112 HandleScope scope(isolate);
113 info.GetReturnValue().Set(v8::Utils::ToLocal(Test())); 113 info.GetReturnValue().Set(v8::Utils::ToLocal(Test()));
114 } 114 }
115 115
116 116
117 void TestSetter( 117 void TestSetter(
118 v8::Local<v8::String> name, 118 v8::Local<v8::Name> name,
119 v8::Local<v8::Value> value, 119 v8::Local<v8::Value> value,
120 const v8::PropertyCallbackInfo<void>& info) { 120 const v8::PropertyCallbackInfo<void>& info) {
121 UNREACHABLE(); 121 UNREACHABLE();
122 } 122 }
123 123
124 124
125 Handle<AccessorInfo> TestAccessorInfo( 125 Handle<AccessorInfo> TestAccessorInfo(
126 Isolate* isolate, PropertyAttributes attributes) { 126 Isolate* isolate, PropertyAttributes attributes) {
127 Handle<String> name = isolate->factory()->NewStringFromStaticAscii("get"); 127 Handle<String> name = isolate->factory()->NewStringFromStaticAscii("get");
128 return Accessors::MakeAccessor(isolate, name, &TestGetter, &TestSetter, 128 return Accessors::MakeAccessor(isolate, name, &TestGetter, &TestSetter,
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 if (index < blocks.length() - 1) { 229 if (index < blocks.length() - 1) {
230 blocks[index] = blocks.RemoveLast(); 230 blocks[index] = blocks.RemoveLast();
231 } else { 231 } else {
232 blocks.RemoveLast(); 232 blocks.RemoveLast();
233 } 233 }
234 } 234 }
235 } 235 }
236 236
237 code_range.TearDown(); 237 code_range.TearDown();
238 } 238 }
OLDNEW
« src/api.cc ('K') | « src/stub-cache.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698