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

Side by Side Diff: src/accessors.cc

Issue 352173006: Clean up the global object naming madness. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')
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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/contexts.h" 10 #include "src/contexts.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 // 146 //
147 // Accessors::ArrayLength 147 // Accessors::ArrayLength
148 // 148 //
149 149
150 150
151 // The helper function will 'flatten' Number objects. 151 // The helper function will 'flatten' Number objects.
152 Handle<Object> Accessors::FlattenNumber(Isolate* isolate, 152 Handle<Object> Accessors::FlattenNumber(Isolate* isolate,
153 Handle<Object> value) { 153 Handle<Object> value) {
154 if (value->IsNumber() || !value->IsJSValue()) return value; 154 if (value->IsNumber() || !value->IsJSValue()) return value;
155 Handle<JSValue> wrapper = Handle<JSValue>::cast(value); 155 Handle<JSValue> wrapper = Handle<JSValue>::cast(value);
156 ASSERT(wrapper->GetIsolate()->context()->native_context()->number_function()-> 156 ASSERT(wrapper->GetIsolate()->native_context()->number_function()->
157 has_initial_map()); 157 has_initial_map());
158 if (wrapper->map() == 158 if (wrapper->map() ==
159 isolate->context()->native_context()->number_function()->initial_map()) { 159 isolate->native_context()->number_function()->initial_map()) {
Igor Sheludko 2014/07/01 08:35:41 While you are here: isolate->number_function()->in
160 return handle(wrapper->value(), isolate); 160 return handle(wrapper->value(), isolate);
161 } 161 }
162 162
163 return value; 163 return value;
164 } 164 }
165 165
166 166
167 void Accessors::ArrayLengthGetter( 167 void Accessors::ArrayLengthGetter(
168 v8::Local<v8::String> name, 168 v8::Local<v8::String> name,
169 const v8::PropertyCallbackInfo<v8::Value>& info) { 169 const v8::PropertyCallbackInfo<v8::Value>& info) {
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 info->set_data(Smi::FromInt(index)); 1352 info->set_data(Smi::FromInt(index));
1353 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); 1353 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport);
1354 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); 1354 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport);
1355 info->set_getter(*getter); 1355 info->set_getter(*getter);
1356 if (!(attributes & ReadOnly)) info->set_setter(*setter); 1356 if (!(attributes & ReadOnly)) info->set_setter(*setter);
1357 return info; 1357 return info;
1358 } 1358 }
1359 1359
1360 1360
1361 } } // namespace v8::internal 1361 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698