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

Unified Diff: src/runtime.cc

Issue 307543008: Simplify, speed-up correct-context ObjectObserve calls (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: <sigh> remove style fix Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime.h ('k') | test/mjsunit/runtime-gen/getobjectcontextnotifierperformchange.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 0bff90b8c0bac865eef8a2544679140e6bbe8202..fcfd8571dce3d4c4caf08342326ac28d5b2f9ad6 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -14902,64 +14902,33 @@ RUNTIME_FUNCTION(Runtime_ObjectWasCreatedInCurrentOrigin) {
}
-RUNTIME_FUNCTION(Runtime_ObjectObserveInObjectContext) {
+RUNTIME_FUNCTION(Runtime_GetObjectContextObjectObserve) {
HandleScope scope(isolate);
- ASSERT(args.length() == 3);
+ ASSERT(args.length() == 1);
CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
- CONVERT_ARG_HANDLE_CHECKED(JSFunction, callback, 1);
- CONVERT_ARG_HANDLE_CHECKED(Object, accept, 2);
Handle<Context> context(object->GetCreationContext(), isolate);
- Handle<JSFunction> function(context->native_object_observe(), isolate);
- Handle<Object> call_args[] = { object, callback, accept };
- Handle<Object> result;
-
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
- isolate, result,
- Execution::Call(isolate, function,
- handle(context->object_function(), isolate),
- ARRAY_SIZE(call_args), call_args, true));
- return *result;
+ return context->native_object_observe();
}
-RUNTIME_FUNCTION(Runtime_ObjectGetNotifierInObjectContext) {
+RUNTIME_FUNCTION(Runtime_GetObjectContextObjectGetNotifier) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);
CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
Handle<Context> context(object->GetCreationContext(), isolate);
- Handle<JSFunction> function(context->native_object_get_notifier(), isolate);
- Handle<Object> call_args[] = { object };
- Handle<Object> result;
-
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
- isolate, result,
- Execution::Call(isolate, function,
- handle(context->object_function(), isolate),
- ARRAY_SIZE(call_args), call_args, true));
- return *result;
+ return context->native_object_get_notifier();
}
-RUNTIME_FUNCTION(Runtime_ObjectNotifierPerformChangeInObjectContext) {
+RUNTIME_FUNCTION(Runtime_GetObjectContextNotifierPerformChange) {
HandleScope scope(isolate);
- ASSERT(args.length() == 3);
+ ASSERT(args.length() == 1);
CONVERT_ARG_HANDLE_CHECKED(JSObject, object_info, 0);
- CONVERT_ARG_HANDLE_CHECKED(String, change_type, 1);
- CONVERT_ARG_HANDLE_CHECKED(JSFunction, change_fn, 2);
Handle<Context> context(object_info->GetCreationContext(), isolate);
- Handle<JSFunction> function(context->native_object_notifier_perform_change(),
- isolate);
- Handle<Object> call_args[] = { object_info, change_type, change_fn };
- Handle<Object> result;
-
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
- isolate, result,
- Execution::Call(isolate, function, isolate->factory()->undefined_value(),
- ARRAY_SIZE(call_args), call_args, true));
- return *result;
+ return context->native_object_notifier_perform_change();
}
« no previous file with comments | « src/runtime.h ('k') | test/mjsunit/runtime-gen/getobjectcontextnotifierperformchange.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698