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

Side by Side Diff: src/type-info.cc

Issue 17096003: Add missing NULL check to TypeFeedbackOracle::CompareTypes() (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 | 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 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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 *left_type = *right_type = *overall_type = *compare_nil_type = 349 *left_type = *right_type = *overall_type = *compare_nil_type =
350 handle(Type::Any(), isolate_); 350 handle(Type::Any(), isolate_);
351 Handle<Object> info = GetInfo(id); 351 Handle<Object> info = GetInfo(id);
352 if (!info->IsCode()) return; 352 if (!info->IsCode()) return;
353 Handle<Code> code = Handle<Code>::cast(info); 353 Handle<Code> code = Handle<Code>::cast(info);
354 354
355 Handle<Map> map; 355 Handle<Map> map;
356 Map* raw_map = code->FindFirstMap(); 356 Map* raw_map = code->FindFirstMap();
357 if (raw_map != NULL) { 357 if (raw_map != NULL) {
358 raw_map = raw_map->CurrentMapForDeprecated(); 358 raw_map = raw_map->CurrentMapForDeprecated();
359 if (!CanRetainOtherContext(raw_map, *native_context_)) { 359 if (raw_map != NULL && !CanRetainOtherContext(raw_map, *native_context_)) {
360 map = handle(raw_map, isolate_); 360 map = handle(raw_map, isolate_);
361 } 361 }
362 } 362 }
363 363
364 if (code->is_compare_ic_stub()) { 364 if (code->is_compare_ic_stub()) {
365 int stub_minor_key = code->stub_info(); 365 int stub_minor_key = code->stub_info();
366 CompareIC::State left_state, right_state, handler_state; 366 CompareIC::State left_state, right_state, handler_state;
367 ICCompareStub::DecodeMinorKey(stub_minor_key, &left_state, &right_state, 367 ICCompareStub::DecodeMinorKey(stub_minor_key, &left_state, &right_state,
368 &handler_state, NULL); 368 &handler_state, NULL);
369 *left_type = CompareIC::StateToType(isolate_, left_state); 369 *left_type = CompareIC::StateToType(isolate_, left_state);
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 USE(maybe_result); 713 USE(maybe_result);
714 #ifdef DEBUG 714 #ifdef DEBUG
715 Object* result = NULL; 715 Object* result = NULL;
716 // Dictionary has been allocated with sufficient size for all elements. 716 // Dictionary has been allocated with sufficient size for all elements.
717 ASSERT(maybe_result->ToObject(&result)); 717 ASSERT(maybe_result->ToObject(&result));
718 ASSERT(*dictionary_ == result); 718 ASSERT(*dictionary_ == result);
719 #endif 719 #endif
720 } 720 }
721 721
722 } } // namespace v8::internal 722 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698