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

Side by Side Diff: src/api.cc

Issue 219303002: Revert 20313 - "Ship promises and weak collections" (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 5816 matching lines...) Expand 10 before | Expand all | Expand 10 after
5827 ENTER_V8(isolate); 5827 ENTER_V8(isolate);
5828 i::Handle<i::JSObject> result = i::JSObject::Copy(paragon_handle); 5828 i::Handle<i::JSObject> result = i::JSObject::Copy(paragon_handle);
5829 has_pending_exception = result.is_null(); 5829 has_pending_exception = result.is_null();
5830 EXCEPTION_BAILOUT_CHECK(isolate, Local<Object>()); 5830 EXCEPTION_BAILOUT_CHECK(isolate, Local<Object>());
5831 return Utils::ToLocal(result); 5831 return Utils::ToLocal(result);
5832 } 5832 }
5833 5833
5834 5834
5835 bool Value::IsPromise() const { 5835 bool Value::IsPromise() const {
5836 i::Handle<i::Object> val = Utils::OpenHandle(this); 5836 i::Handle<i::Object> val = Utils::OpenHandle(this);
5837 if (!val->IsJSObject()) return false; 5837 if (!i::FLAG_harmony_promises || !val->IsJSObject()) return false;
5838 i::Handle<i::JSObject> obj = i::Handle<i::JSObject>::cast(val); 5838 i::Handle<i::JSObject> obj = i::Handle<i::JSObject>::cast(val);
5839 i::Isolate* isolate = obj->GetIsolate(); 5839 i::Isolate* isolate = obj->GetIsolate();
5840 LOG_API(isolate, "IsPromise"); 5840 LOG_API(isolate, "IsPromise");
5841 ENTER_V8(isolate); 5841 ENTER_V8(isolate);
5842 EXCEPTION_PREAMBLE(isolate); 5842 EXCEPTION_PREAMBLE(isolate);
5843 i::Handle<i::Object> argv[] = { obj }; 5843 i::Handle<i::Object> argv[] = { obj };
5844 i::Handle<i::Object> b = i::Execution::Call( 5844 i::Handle<i::Object> b = i::Execution::Call(
5845 isolate, 5845 isolate,
5846 handle( 5846 handle(
5847 isolate->context()->global_object()->native_context()->is_promise()), 5847 isolate->context()->global_object()->native_context()->is_promise()),
(...skipping 1805 matching lines...) Expand 10 before | Expand all | Expand 10 after
7653 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7653 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7654 Address callback_address = 7654 Address callback_address =
7655 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7655 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7656 VMState<EXTERNAL> state(isolate); 7656 VMState<EXTERNAL> state(isolate);
7657 ExternalCallbackScope call_scope(isolate, callback_address); 7657 ExternalCallbackScope call_scope(isolate, callback_address);
7658 callback(info); 7658 callback(info);
7659 } 7659 }
7660 7660
7661 7661
7662 } } // namespace v8::internal 7662 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698