<commit_before>// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE.chromium file.

#include "native_mate/wrappable.h"

#include "base/logging.h"
#include "native_mate/dictionary.h"
#include "native_mate/object_template_builder.h"

namespace mate {

Wrappable::Wrappable() : isolate_(NULL) {
}

Wrappable::~Wrappable() {
  wrapper_.Reset();<commit_msg>Clear internal field when Wrapper is destroyed<commit_after>// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE.chromium file.

#include "native_mate/wrappable.h"

#include "base/logging.h"
#include "native_mate/dictionary.h"
#include "native_mate/object_template_builder.h"

namespace mate {

Wrappable::Wrappable() : isolate_(NULL) {
}

Wrappable::~Wrappable() {
  if (!wrapper_.IsEmpty())
    GetWrapper(isolate())->SetAlignedPointerInInternalField(0, nullptr);
  wrapper_.Reset();
{'fraction_non_alphanumeric': 0.11820781696854146, 'fraction_numerical': 0.008579599618684462, 'mean_word_length': 5.21301775147929, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4789685', 'n_tokens_mistral': 340, 'n_tokens_neox': 335, 'n_words': 93}