OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
60 ASSERT(m_isLocked); | 60 ASSERT(m_isLocked); |
61 m_isLocked = false; | 61 m_isLocked = false; |
62 // Force eviction to catch clients not correctly checking the return value o f lock(). | 62 // Force eviction to catch clients not correctly checking the return value o f lock(). |
63 memset(m_data.data(), 0, m_data.size()); | 63 memset(m_data.data(), 0, m_data.size()); |
64 } | 64 } |
65 | 65 |
66 TestingPlatformSupport::TestingPlatformSupport(const Config& config) | 66 TestingPlatformSupport::TestingPlatformSupport(const Config& config) |
67 : m_config(config) | 67 : m_config(config) |
68 , m_oldPlatform(Platform::current()) | 68 , m_oldPlatform(Platform::current()) |
69 { | 69 { |
70 fprintf(stderr, "TestingPlatformSupport\n"); | |
Sami
2015/04/16 14:23:38
Left in by mistake?
alex clarke (OOO till 29th)
2015/04/16 17:20:01
Done.
| |
70 Platform::initialize(this); | 71 Platform::initialize(this); |
71 } | 72 } |
72 | 73 |
73 TestingPlatformSupport::~TestingPlatformSupport() | 74 TestingPlatformSupport::~TestingPlatformSupport() |
74 { | 75 { |
75 Platform::initialize(m_oldPlatform); | 76 Platform::initialize(m_oldPlatform); |
76 } | 77 } |
77 | 78 |
78 WebDiscardableMemory* TestingPlatformSupport::allocateAndLockDiscardableMemory(s ize_t bytes) | 79 WebDiscardableMemory* TestingPlatformSupport::allocateAndLockDiscardableMemory(s ize_t bytes) |
79 { | 80 { |
80 return !m_config.hasDiscardableMemorySupport ? 0 : new TestingDiscardableMem ory(bytes); | 81 return !m_config.hasDiscardableMemorySupport ? 0 : new TestingDiscardableMem ory(bytes); |
81 } | 82 } |
82 | 83 |
83 void TestingPlatformSupport::cryptographicallyRandomValues(unsigned char* buffer , size_t length) | 84 void TestingPlatformSupport::cryptographicallyRandomValues(unsigned char* buffer , size_t length) |
84 { | 85 { |
85 } | 86 } |
86 | 87 |
87 const unsigned char* TestingPlatformSupport::getTraceCategoryEnabledFlag(const c har* categoryName) | 88 const unsigned char* TestingPlatformSupport::getTraceCategoryEnabledFlag(const c har* categoryName) |
88 { | 89 { |
89 static const unsigned char tracingIsDisabled = 0; | 90 static const unsigned char tracingIsDisabled = 0; |
90 return &tracingIsDisabled; | 91 return &tracingIsDisabled; |
91 } | 92 } |
92 | 93 |
93 } // namespace blink | 94 } // namespace blink |
OLD | NEW |