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

Side by Side Diff: src/api.cc

Issue 3064051: Add v8::Value::IsRegExp method. (Closed)
Patch Set: Created 10 years, 4 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
« no previous file with comments | « include/v8.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 1774 matching lines...) Expand 10 before | Expand all | Expand 10 after
1785 } 1785 }
1786 1786
1787 1787
1788 bool Value::IsDate() const { 1788 bool Value::IsDate() const {
1789 if (IsDeadCheck("v8::Value::IsDate()")) return false; 1789 if (IsDeadCheck("v8::Value::IsDate()")) return false;
1790 i::Handle<i::Object> obj = Utils::OpenHandle(this); 1790 i::Handle<i::Object> obj = Utils::OpenHandle(this);
1791 return obj->HasSpecificClassOf(i::Heap::Date_symbol()); 1791 return obj->HasSpecificClassOf(i::Heap::Date_symbol());
1792 } 1792 }
1793 1793
1794 1794
1795 bool Value::IsRegExp() const {
1796 if (IsDeadCheck("v8::Value::IsRegExp()")) return false;
1797 i::Handle<i::Object> obj = Utils::OpenHandle(this);
1798 return obj->IsJSRegExp();
1799 }
1800
1801
1795 Local<String> Value::ToString() const { 1802 Local<String> Value::ToString() const {
1796 if (IsDeadCheck("v8::Value::ToString()")) return Local<String>(); 1803 if (IsDeadCheck("v8::Value::ToString()")) return Local<String>();
1797 LOG_API("ToString"); 1804 LOG_API("ToString");
1798 i::Handle<i::Object> obj = Utils::OpenHandle(this); 1805 i::Handle<i::Object> obj = Utils::OpenHandle(this);
1799 i::Handle<i::Object> str; 1806 i::Handle<i::Object> str;
1800 if (obj->IsString()) { 1807 if (obj->IsString()) {
1801 str = obj; 1808 str = obj;
1802 } else { 1809 } else {
1803 ENTER_V8; 1810 ENTER_V8;
1804 EXCEPTION_PREAMBLE(); 1811 EXCEPTION_PREAMBLE();
(...skipping 2995 matching lines...) Expand 10 before | Expand all | Expand 10 after
4800 4807
4801 4808
4802 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 4809 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
4803 HandleScopeImplementer* thread_local = 4810 HandleScopeImplementer* thread_local =
4804 reinterpret_cast<HandleScopeImplementer*>(storage); 4811 reinterpret_cast<HandleScopeImplementer*>(storage);
4805 thread_local->IterateThis(v); 4812 thread_local->IterateThis(v);
4806 return storage + ArchiveSpacePerThread(); 4813 return storage + ArchiveSpacePerThread();
4807 } 4814 }
4808 4815
4809 } } // namespace v8::internal 4816 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698