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

Side by Side Diff: src/api.cc

Issue 216613003: Don't crash if we get a timezone change notification on an uninitialized isolate (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/date.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 5692 matching lines...) Expand 10 before | Expand all | Expand 10 after
5703 i::Isolate* isolate = i::Isolate::Current(); 5703 i::Isolate* isolate = i::Isolate::Current();
5704 LOG_API(isolate, "Date::NumberValue"); 5704 LOG_API(isolate, "Date::NumberValue");
5705 i::Handle<i::Object> obj = Utils::OpenHandle(this); 5705 i::Handle<i::Object> obj = Utils::OpenHandle(this);
5706 i::Handle<i::JSDate> jsdate = i::Handle<i::JSDate>::cast(obj); 5706 i::Handle<i::JSDate> jsdate = i::Handle<i::JSDate>::cast(obj);
5707 return jsdate->value()->Number(); 5707 return jsdate->value()->Number();
5708 } 5708 }
5709 5709
5710 5710
5711 void v8::Date::DateTimeConfigurationChangeNotification(Isolate* isolate) { 5711 void v8::Date::DateTimeConfigurationChangeNotification(Isolate* isolate) {
5712 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); 5712 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
5713 if (!isolate->IsInitialized()) return;
5713 ON_BAILOUT(i_isolate, "v8::Date::DateTimeConfigurationChangeNotification()", 5714 ON_BAILOUT(i_isolate, "v8::Date::DateTimeConfigurationChangeNotification()",
5714 return); 5715 return);
5715 LOG_API(i_isolate, "Date::DateTimeConfigurationChangeNotification"); 5716 LOG_API(i_isolate, "Date::DateTimeConfigurationChangeNotification");
5716 ENTER_V8(i_isolate); 5717 ENTER_V8(i_isolate);
5717 5718
5718 i_isolate->date_cache()->ResetDateCache(); 5719 i_isolate->date_cache()->ResetDateCache();
5719 5720
5720 if (!i_isolate->eternal_handles()->Exists( 5721 if (!i_isolate->eternal_handles()->Exists(
5721 i::EternalHandles::DATE_CACHE_VERSION)) { 5722 i::EternalHandles::DATE_CACHE_VERSION)) {
5722 return; 5723 return;
(...skipping 1921 matching lines...) Expand 10 before | Expand all | Expand 10 after
7644 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7645 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7645 Address callback_address = 7646 Address callback_address =
7646 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7647 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7647 VMState<EXTERNAL> state(isolate); 7648 VMState<EXTERNAL> state(isolate);
7648 ExternalCallbackScope call_scope(isolate, callback_address); 7649 ExternalCallbackScope call_scope(isolate, callback_address);
7649 callback(info); 7650 callback(info);
7650 } 7651 }
7651 7652
7652 7653
7653 } } // namespace v8::internal 7654 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/date.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698