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

Unified Diff: src/runtime.cc

Issue 227483007: Handlify LiveEdit. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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/liveedit.cc ('k') | no next file » | 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 11df15abd6b895cd90de8b23f7902ab324388b41..a080c7e3f2f95ee2e7ac6904aad1920fe5f8814e 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -13443,13 +13443,10 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_LiveEditGatherCompileInfo) {
RUNTIME_ASSERT(script->value()->IsScript());
Handle<Script> script_handle = Handle<Script>(Script::cast(script->value()));
- JSArray* result = LiveEdit::GatherCompileInfo(script_handle, source);
-
- if (isolate->has_pending_exception()) {
- return Failure::Exception();
- }
-
- return result;
+ Handle<JSArray> result;
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
+ isolate, result, LiveEdit::GatherCompileInfo(script_handle, source));
+ return *result;
}
@@ -13467,12 +13464,11 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_LiveEditReplaceScript) {
RUNTIME_ASSERT(original_script_value->value()->IsScript());
Handle<Script> original_script(Script::cast(original_script_value->value()));
- Object* old_script = LiveEdit::ChangeScriptSource(original_script,
- new_source,
- old_script_name);
+ Handle<Object> old_script = LiveEdit::ChangeScriptSource(
+ original_script, new_source, old_script_name);
if (old_script->IsScript()) {
- Handle<Script> script_handle(Script::cast(old_script));
+ Handle<Script> script_handle = Handle<Script>::cast(old_script);
return *(GetScriptWrapper(script_handle));
} else {
return isolate->heap()->null_value();
@@ -13485,7 +13481,10 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_LiveEditFunctionSourceUpdated) {
CHECK(isolate->debugger()->live_edit_enabled());
ASSERT(args.length() == 1);
CONVERT_ARG_HANDLE_CHECKED(JSArray, shared_info, 0);
- return LiveEdit::FunctionSourceUpdated(shared_info);
+ RUNTIME_ASSERT(SharedInfoWrapper::IsInstance(shared_info));
+
+ LiveEdit::FunctionSourceUpdated(shared_info);
+ return isolate->heap()->undefined_value();
}
@@ -13496,8 +13495,10 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_LiveEditReplaceFunctionCode) {
ASSERT(args.length() == 2);
CONVERT_ARG_HANDLE_CHECKED(JSArray, new_compile_info, 0);
CONVERT_ARG_HANDLE_CHECKED(JSArray, shared_info, 1);
+ RUNTIME_ASSERT(SharedInfoWrapper::IsInstance(shared_info));
- return LiveEdit::ReplaceFunctionCode(new_compile_info, shared_info);
+ LiveEdit::ReplaceFunctionCode(new_compile_info, shared_info);
+ return isolate->heap()->undefined_value();
}
@@ -13538,9 +13539,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_LiveEditReplaceRefToNestedFunction) {
CONVERT_ARG_HANDLE_CHECKED(JSValue, orig_wrapper, 1);
CONVERT_ARG_HANDLE_CHECKED(JSValue, subst_wrapper, 2);
- LiveEdit::ReplaceRefToNestedFunction(parent_wrapper, orig_wrapper,
- subst_wrapper);
-
+ LiveEdit::ReplaceRefToNestedFunction(
+ parent_wrapper, orig_wrapper, subst_wrapper);
return isolate->heap()->undefined_value();
}
@@ -13557,7 +13557,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_LiveEditPatchFunctionPositions) {
CONVERT_ARG_HANDLE_CHECKED(JSArray, shared_array, 0);
CONVERT_ARG_HANDLE_CHECKED(JSArray, position_change_array, 1);
- return LiveEdit::PatchFunctionPositions(shared_array, position_change_array);
+ LiveEdit::PatchFunctionPositions(shared_array, position_change_array);
+ return isolate->heap()->undefined_value();
}
« no previous file with comments | « src/liveedit.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698