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

Side by Side Diff: src/api.cc

Issue 6975020: Per-isolate embedder-specific data (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added missing file Created 9 years, 7 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 | « include/v8.h ('k') | src/isolate.h » ('j') | src/isolate.h » ('J')
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 4852 matching lines...) Expand 10 before | Expand all | Expand 10 after
4863 isolate->Enter(); 4863 isolate->Enter();
4864 } 4864 }
4865 4865
4866 4866
4867 void Isolate::Exit() { 4867 void Isolate::Exit() {
4868 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); 4868 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
4869 isolate->Exit(); 4869 isolate->Exit();
4870 } 4870 }
4871 4871
4872 4872
4873 void Isolate::SetData(void* data) {
4874 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
4875 isolate->SetData(data);
4876 }
4877
4878 void* Isolate::GetData() {
4879 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
4880 return isolate->GetData();
4881 }
4882
4883
4873 String::Utf8Value::Utf8Value(v8::Handle<v8::Value> obj) 4884 String::Utf8Value::Utf8Value(v8::Handle<v8::Value> obj)
4874 : str_(NULL), length_(0) { 4885 : str_(NULL), length_(0) {
4875 i::Isolate* isolate = i::Isolate::Current(); 4886 i::Isolate* isolate = i::Isolate::Current();
4876 if (IsDeadCheck(isolate, "v8::String::Utf8Value::Utf8Value()")) return; 4887 if (IsDeadCheck(isolate, "v8::String::Utf8Value::Utf8Value()")) return;
4877 if (obj.IsEmpty()) return; 4888 if (obj.IsEmpty()) return;
4878 ENTER_V8(isolate); 4889 ENTER_V8(isolate);
4879 i::HandleScope scope(isolate); 4890 i::HandleScope scope(isolate);
4880 TryCatch try_catch; 4891 TryCatch try_catch;
4881 Handle<String> str = obj->ToString(); 4892 Handle<String> str = obj->ToString();
4882 if (str.IsEmpty()) return; 4893 if (str.IsEmpty()) return;
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after
5825 5836
5826 5837
5827 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 5838 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
5828 HandleScopeImplementer* scope_implementer = 5839 HandleScopeImplementer* scope_implementer =
5829 reinterpret_cast<HandleScopeImplementer*>(storage); 5840 reinterpret_cast<HandleScopeImplementer*>(storage);
5830 scope_implementer->IterateThis(v); 5841 scope_implementer->IterateThis(v);
5831 return storage + ArchiveSpacePerThread(); 5842 return storage + ArchiveSpacePerThread();
5832 } 5843 }
5833 5844
5834 } } // namespace v8::internal 5845 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/isolate.h » ('j') | src/isolate.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698