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

Side by Side Diff: src/api.cc

Issue 7618040: Version 3.5.5. (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 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
« no previous file with comments | « ChangeLog ('k') | src/apinatives.js » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 3145 matching lines...) Expand 10 before | Expand all | Expand 10 after
3156 has_pending_exception = result.is_null(); 3156 has_pending_exception = result.is_null();
3157 EXCEPTION_BAILOUT_CHECK(isolate, Local<Object>()); 3157 EXCEPTION_BAILOUT_CHECK(isolate, Local<Object>());
3158 return Utils::ToLocal(result); 3158 return Utils::ToLocal(result);
3159 } 3159 }
3160 3160
3161 3161
3162 static i::Context* GetCreationContext(i::JSObject* object) { 3162 static i::Context* GetCreationContext(i::JSObject* object) {
3163 i::Object* constructor = object->map()->constructor(); 3163 i::Object* constructor = object->map()->constructor();
3164 i::JSFunction* function; 3164 i::JSFunction* function;
3165 if (!constructor->IsJSFunction()) { 3165 if (!constructor->IsJSFunction()) {
3166 // API functions have null as a constructor, 3166 // Functions have null as a constructor,
3167 // but any JSFunction knows its context immediately. 3167 // but any JSFunction knows its context immediately.
3168 ASSERT(object->IsJSFunction() && 3168 ASSERT(object->IsJSFunction());
3169 i::JSFunction::cast(object)->shared()->IsApiFunction());
3170 function = i::JSFunction::cast(object); 3169 function = i::JSFunction::cast(object);
3171 } else { 3170 } else {
3172 function = i::JSFunction::cast(constructor); 3171 function = i::JSFunction::cast(constructor);
3173 } 3172 }
3174 return function->context()->global_context(); 3173 return function->context()->global_context();
3175 } 3174 }
3176 3175
3177 3176
3178 Local<v8::Context> v8::Object::CreationContext() { 3177 Local<v8::Context> v8::Object::CreationContext() {
3179 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); 3178 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
(...skipping 2856 matching lines...) Expand 10 before | Expand all | Expand 10 after
6036 6035
6037 6036
6038 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 6037 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
6039 HandleScopeImplementer* scope_implementer = 6038 HandleScopeImplementer* scope_implementer =
6040 reinterpret_cast<HandleScopeImplementer*>(storage); 6039 reinterpret_cast<HandleScopeImplementer*>(storage);
6041 scope_implementer->IterateThis(v); 6040 scope_implementer->IterateThis(v);
6042 return storage + ArchiveSpacePerThread(); 6041 return storage + ArchiveSpacePerThread();
6043 } 6042 }
6044 6043
6045 } } // namespace v8::internal 6044 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « ChangeLog ('k') | src/apinatives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698