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

Unified Diff: src/liveedit.cc

Issue 16337005: Deprecate FACTORY helper macro. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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/jsregexp.cc ('k') | src/messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/liveedit.cc
diff --git a/src/liveedit.cc b/src/liveedit.cc
index b28cd3e8727fee79309ccd550b148b5cc7ca3db7..82d7aa2e7ca2e77d3dc425c2c3959c34f65e56c3 100644
--- a/src/liveedit.cc
+++ b/src/liveedit.cc
@@ -631,10 +631,10 @@ static Handle<Object> UnwrapJSValue(Handle<JSValue> jsValue) {
// Wraps any object into a OpaqueReference, that will hide the object
// from JavaScript.
static Handle<JSValue> WrapInJSValue(Handle<Object> object) {
- Handle<JSFunction> constructor =
- Isolate::Current()->opaque_reference_function();
+ Isolate* isolate = Isolate::Current();
+ Handle<JSFunction> constructor = isolate->opaque_reference_function();
Handle<JSValue> result =
- Handle<JSValue>::cast(FACTORY->NewJSObject(constructor));
+ Handle<JSValue>::cast(isolate->factory()->NewJSObject(constructor));
result->set_value(*object);
return result;
}
@@ -662,7 +662,8 @@ template<typename S>
class JSArrayBasedStruct {
public:
static S Create() {
- Handle<JSArray> array = FACTORY->NewJSArray(S::kSize_);
+ Factory* factory = Isolate::Current()->factory();
+ Handle<JSArray> array = factory->NewJSArray(S::kSize_);
return S(array);
}
static S cast(Object* object) {
@@ -1293,7 +1294,7 @@ MaybeObject* LiveEdit::ReplaceFunctionCode(
if (shared_info->debug_info()->IsDebugInfo()) {
Handle<DebugInfo> debug_info(DebugInfo::cast(shared_info->debug_info()));
Handle<Code> new_original_code =
- FACTORY->CopyCode(compile_info_wrapper.GetFunctionCode());
+ isolate->factory()->CopyCode(compile_info_wrapper.GetFunctionCode());
debug_info->set_original_code(*new_original_code);
}
@@ -1460,6 +1461,7 @@ class RelocInfoBuffer {
static Handle<Code> PatchPositionsInCode(
Handle<Code> code,
Handle<JSArray> position_change_array) {
+ Isolate* isolate = code->GetIsolate();
RelocInfoBuffer buffer_writer(code->relocation_size(),
code->instruction_start());
@@ -1494,7 +1496,7 @@ static Handle<Code> PatchPositionsInCode(
// Relocation info section now has different size. We cannot simply
// rewrite it inside code object. Instead we have to create a new
// code object.
- Handle<Code> result(FACTORY->CopyCode(code, buffer));
+ Handle<Code> result(isolate->factory()->CopyCode(code, buffer));
return result;
}
}
@@ -1542,9 +1544,10 @@ MaybeObject* LiveEdit::PatchFunctionPositions(
static Handle<Script> CreateScriptCopy(Handle<Script> original) {
- Handle<String> original_source(String::cast(original->source()));
+ Isolate* isolate = original->GetIsolate();
- Handle<Script> copy = FACTORY->NewScript(original_source);
+ Handle<String> original_source(String::cast(original->source()));
+ Handle<Script> copy = isolate->factory()->NewScript(original_source);
copy->set_name(original->name());
copy->set_line_offset(original->line_offset());
@@ -2007,7 +2010,7 @@ Handle<JSArray> LiveEdit::CheckAndDropActivations(
if (error_message != NULL) {
// Add error message as an array extra element.
Vector<const char> vector_message(error_message, StrLength(error_message));
- Handle<String> str = FACTORY->NewStringFromAscii(vector_message);
+ Handle<String> str = isolate->factory()->NewStringFromAscii(vector_message);
SetElementNonStrict(result, len, str);
}
return result;
« no previous file with comments | « src/jsregexp.cc ('k') | src/messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698