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

Side by Side Diff: src/api.cc

Issue 11961014: Inline SetWrapperClassId() and WrapperClassId() (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: patch Created 7 years, 11 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
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 4783 matching lines...) Expand 10 before | Expand all | Expand 10 after
4794 } 4794 }
4795 ENTER_V8(isolate); 4795 ENTER_V8(isolate);
4796 i::Object** ctx = reinterpret_cast<i::Object**>(this); 4796 i::Object** ctx = reinterpret_cast<i::Object**>(this);
4797 i::Handle<i::Context> context = 4797 i::Handle<i::Context> context =
4798 i::Handle<i::Context>::cast(i::Handle<i::Object>(ctx)); 4798 i::Handle<i::Context>::cast(i::Handle<i::Object>(ctx));
4799 i::Handle<i::Object> error_handle = Utils::OpenHandle(*error); 4799 i::Handle<i::Object> error_handle = Utils::OpenHandle(*error);
4800 context->set_error_message_for_code_gen_from_strings(*error_handle); 4800 context->set_error_message_for_code_gen_from_strings(*error_handle);
4801 } 4801 }
4802 4802
4803 4803
4804 void V8::SetWrapperClassId(i::Object** global_handle, uint16_t class_id) {
4805 i::GlobalHandles::SetWrapperClassId(global_handle, class_id);
4806 }
4807
4808
4809 uint16_t V8::GetWrapperClassId(internal::Object** global_handle) {
4810 return i::GlobalHandles::GetWrapperClassId(global_handle);
4811 }
4812
4813
4814 Local<v8::Object> ObjectTemplate::NewInstance() { 4804 Local<v8::Object> ObjectTemplate::NewInstance() {
4815 i::Isolate* isolate = i::Isolate::Current(); 4805 i::Isolate* isolate = i::Isolate::Current();
4816 ON_BAILOUT(isolate, "v8::ObjectTemplate::NewInstance()", 4806 ON_BAILOUT(isolate, "v8::ObjectTemplate::NewInstance()",
4817 return Local<v8::Object>()); 4807 return Local<v8::Object>());
4818 LOG_API(isolate, "ObjectTemplate::NewInstance"); 4808 LOG_API(isolate, "ObjectTemplate::NewInstance");
4819 ENTER_V8(isolate); 4809 ENTER_V8(isolate);
4820 EXCEPTION_PREAMBLE(isolate); 4810 EXCEPTION_PREAMBLE(isolate);
4821 i::Handle<i::Object> obj = 4811 i::Handle<i::Object> obj =
4822 i::Execution::InstantiateObject(Utils::OpenHandle(this), 4812 i::Execution::InstantiateObject(Utils::OpenHandle(this),
4823 &has_pending_exception); 4813 &has_pending_exception);
(...skipping 1921 matching lines...) Expand 10 before | Expand all | Expand 10 after
6745 6735
6746 v->VisitPointers(blocks_.first(), first_block_limit_); 6736 v->VisitPointers(blocks_.first(), first_block_limit_);
6747 6737
6748 for (int i = 1; i < blocks_.length(); i++) { 6738 for (int i = 1; i < blocks_.length(); i++) {
6749 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); 6739 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]);
6750 } 6740 }
6751 } 6741 }
6752 6742
6753 6743
6754 } } // namespace v8::internal 6744 } } // namespace v8::internal
OLDNEW
« include/v8.h ('K') | « include/v8.h ('k') | src/global-handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698