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

Unified Diff: src/isolate-inl.h

Issue 2181323002: Make some crucial Isolate functions inlineable (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: revert overzealous inlining Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/isolate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate-inl.h
diff --git a/src/isolate-inl.h b/src/isolate-inl.h
index 46f29b652d618c4acab7b62f513189d1b38942b4..c6a47a3f9f1b18ce818ab7978dfea34cae66f147 100644
--- a/src/isolate-inl.h
+++ b/src/isolate-inl.h
@@ -17,6 +17,11 @@ void Isolate::set_context(Context* context) {
thread_local_top_.context_ = context;
}
+Handle<Context> Isolate::native_context() {
+ return handle(context()->native_context(), this);
+}
+
+Context* Isolate::raw_native_context() { return context()->native_context(); }
Object* Isolate::pending_exception() {
DCHECK(has_pending_exception());
@@ -71,6 +76,11 @@ bool Isolate::is_catchable_by_javascript(Object* exception) {
return exception != heap()->termination_exception();
}
+void Isolate::FireBeforeCallEnteredCallback() {
+ for (int i = 0; i < before_call_entered_callbacks_.length(); i++) {
+ before_call_entered_callbacks_.at(i)(reinterpret_cast<v8::Isolate*>(this));
+ }
+}
Handle<JSGlobalObject> Isolate::global_object() {
return handle(context()->global_object(), this);
@@ -90,13 +100,12 @@ Isolate::ExceptionScope::~ExceptionScope() {
isolate_->set_pending_exception(*pending_exception_);
}
-
-#define NATIVE_CONTEXT_FIELD_ACCESSOR(index, type, name) \
- Handle<type> Isolate::name() { \
- return Handle<type>(native_context()->name(), this); \
- } \
- bool Isolate::is_##name(type* value) { \
- return native_context()->is_##name(value); \
+#define NATIVE_CONTEXT_FIELD_ACCESSOR(index, type, name) \
+ Handle<type> Isolate::name() { \
+ return Handle<type>(raw_native_context()->name(), this); \
+ } \
+ bool Isolate::is_##name(type* value) { \
+ return raw_native_context()->is_##name(value); \
}
NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSOR)
#undef NATIVE_CONTEXT_FIELD_ACCESSOR
« no previous file with comments | « src/isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698