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

Side by Side Diff: src/api.cc

Issue 8681007: Rolling back r10049 due to webkit failures. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 1 month 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/heap.h » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 4538 matching lines...) Expand 10 before | Expand all | Expand 10 after
4549 } 4549 }
4550 return result; 4550 return result;
4551 } 4551 }
4552 4552
4553 4553
4554 bool v8::String::CanMakeExternal() { 4554 bool v8::String::CanMakeExternal() {
4555 if (!internal::FLAG_clever_optimizations) return false; 4555 if (!internal::FLAG_clever_optimizations) return false;
4556 i::Handle<i::String> obj = Utils::OpenHandle(this); 4556 i::Handle<i::String> obj = Utils::OpenHandle(this);
4557 i::Isolate* isolate = obj->GetIsolate(); 4557 i::Isolate* isolate = obj->GetIsolate();
4558 if (IsDeadCheck(isolate, "v8::String::CanMakeExternal()")) return false; 4558 if (IsDeadCheck(isolate, "v8::String::CanMakeExternal()")) return false;
4559 if (isolate->string_tracker()->IsFreshUnusedString(obj)) return false; 4559 if (isolate->string_tracker()->IsFreshUnusedString(obj)) {
4560 return false;
4561 }
4560 int size = obj->Size(); // Byte size of the original string. 4562 int size = obj->Size(); // Byte size of the original string.
4561 if (size < i::ExternalString::kShortSize) return false; 4563 if (size < i::ExternalString::kSize)
4564 return false;
4562 i::StringShape shape(*obj); 4565 i::StringShape shape(*obj);
4563 return !shape.IsExternal(); 4566 return !shape.IsExternal();
4564 } 4567 }
4565 4568
4566 4569
4567 Local<v8::Object> v8::Object::New() { 4570 Local<v8::Object> v8::Object::New() {
4568 i::Isolate* isolate = i::Isolate::Current(); 4571 i::Isolate* isolate = i::Isolate::Current();
4569 EnsureInitializedForIsolate(isolate, "v8::Object::New()"); 4572 EnsureInitializedForIsolate(isolate, "v8::Object::New()");
4570 LOG_API(isolate, "Object::New"); 4573 LOG_API(isolate, "Object::New");
4571 ENTER_V8(isolate); 4574 ENTER_V8(isolate);
(...skipping 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after
6114 6117
6115 6118
6116 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 6119 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
6117 HandleScopeImplementer* scope_implementer = 6120 HandleScopeImplementer* scope_implementer =
6118 reinterpret_cast<HandleScopeImplementer*>(storage); 6121 reinterpret_cast<HandleScopeImplementer*>(storage);
6119 scope_implementer->IterateThis(v); 6122 scope_implementer->IterateThis(v);
6120 return storage + ArchiveSpacePerThread(); 6123 return storage + ArchiveSpacePerThread();
6121 } 6124 }
6122 6125
6123 } } // namespace v8::internal 6126 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698