After watching his mother die on AMC’s “The Walking Dead,” Carl Grimes says his goodbyes and then shoots her in the head to ensure she won’t come back as a zombie. Actor Chandler Riggs was 12 at the time he played the role.

As entertainment continues to push the envelope, pundits debate how to protect the kids who watch. But what about the young actors involved in telling these increasingly extreme stories? How does the industry protect them when they are called upon to perform scenes that involve violence, sexuality and other mature content?

In the adult-oriented comicbook adaptation “Kick-Ass,” the film’s most foul-mouthed and ruthless character is a prepubescent crimefighter named Hit Girl, who delivers the line, “Okay, you c—s, let’s see what you can do now!” Chloe Grace Moretz was 11 when she shot the part, and 15 for the sequel, which opens next month.

This year’s Cannes film festival was full of international pics featuring young characters in edgy situations. In Palme d’Or winner “Blue Is the Warmest Color,” teenage actress Adele Exarchopoulos plays a 15-year-old student who experiences her first lesbian sexual experiences with an older woman. And Mexican drug-war drama “Heli” stirred controversy over a scene that depicts kids participating in a horrific torture sequence that ends with a teen drug dealer’s private parts being lit on fire.

SEE MORE: PHOTOS: Variety’s Youth Impact Report

Onstage, 13-year-old Brighid Fleming played a provocative role in the Center Theater Group production of “The Nether,” which takes place in a virtual world where real adults manipulate a teenage girl avatar. The play implies that she is a sexual object for older men and features a scene in which she is murdered with an ax — an ordeal repeated night after night for the duration of the show’s run.

According to professionals, the first thing the public must understand is that the children are acting: What they experience on-set is far different from what their characters appear to go through onscreen, heightened for viewers’ sake by body doubles, editing and other filmmaking tricks.

“You either believe it or you don’t,” says Paul Petersen, the former “Donna Reed Show” regular who founded nonprofit org A Minor Consideration to help counsel young performers about the pitfalls of celebrity (which extend to objectification offscreen, he says). “I once played a young boy in the Ford (Television) Theater where I witnessed my father hanged by the neck until dead. The impact on me as a developing child … it affected me like it really happened.”

SEE MORE: Variety Power of Youth Party Amps Kid Champs

Others insist that whatever their age, actors understand how to separate make-believe from real life, arguing that it’s not the content of the performances but the context in which the actors are raised that matters, with parents being the most important factor. As one insider put it, “You have someone like Lindsay Lohan who made ‘The Parent Trap,’ and she ends up a messed-up drug addict. And you have someone like Jodie Foster, who played a drug addict and ends up just fine.”

Tough Enough to Take It

In the case of Moretz, who also plays the title role in Stephen King remake “Carrie” this fall, those who work with the actress describe her as being unusually comfortable around tough material. Moretz started acting in 2001 and shot “The Amityville Horror” at age 6. On set, she is supported by her mother, older brother Trevor (who exec produced “Kick-Ass 2” and doubles as her acting coach) and longtime teacher Sissie Torrance.

According to “Kick-Ass 2” director Jeff Wadlow, “Her EQ is off the charts. Her innate understanding of emotions is just mind-boggling.” Considering Moretz’s maturity level, the helmer felt it was important to treat her the same way he dealt with his adult cast. “When it came to particularly violent things her character would have to do, I feel like it’s a disservice to the actor not to loop them in,” he says. “If you’ve created a safe environment where the actor can ask questions and we can talk about what’s happening in an honest fashion, I think that’s ultimately a lot more beneficial to the actor’s growth and the effort to protect them as a minor than it would be to hide what’s going on from them.”

When it comes to legal restrictions around working with minors, safety is the paramount concern, especially with regard to stunts.

SEE MORE: Variety Youth Impact Report

Other considerations vary from state to state, with California having some of the strictest child labor laws in the country. Nudity is absolutely forbidden, regardless of context (that “Man of Steel” scene featuring naked baby Clark Kent had to be shot in Vancouver). Real cigarettes are forbidden on set. And the number of hours a minor works is rigidly enforced (on “Kick-Ass 2,” Wadlow designed his coverage so he could complete it without Moretz if needed — a trick he learned from producer Bill Bannerman on “Never Back Down”).

But when it comes to moral content, the labor commission leaves it to the discretion of parents. “The parent is No. 1 in the children’s lives. They have to decide what’s best for them,” says Coast to Coast agent Meredith Fine, who takes pride in matching her clients to appropriate material. Fine reps three of the young actresses in the R-rated haunted-house chiller “The Conjuring,” but insists, “It wasn’t scary on set because there are lots of people protecting the kids.”

In other cases, something as innocuous as a Nickelodeon or Disney Channel series may cross a child actor’s comfort line. “I do have clients who pass on projects because the material is too scary for them, or because a young girl is not ready to have her first kiss onscreen,” Fine says. “You have to recognize what makes sense for your child. I think the success of these kids is that they have a good support team around them.”

The Last Line of Defense

In addition to parents or guardians, the law dictates that a social worker be present on set whenever minors are involved, usually in the form of unionized studio teachers. Because the production pays that additional salary, “They combine this role into one: I’m a teacher, social worker and lawyer,” says Tom O’Flaherty, the studio teacher on “The Nether.” “The parents are the first one to make the decision if they want their kid to do this type of role, and then we’re there as a support system for the kid and for the family, to make sure they’re comfortable, safe and taken care of in every aspect. We’re the watchdogs.”

With “The Nether,” O’Flaherty was hired by the production early on, giving input during rewrites and planning so playwright Jennifer Haley could portray the show’s predatory virtual world without putting teenage Fleming at physical risk. As for the emotional demands, “The actress was very aware of the material,” O’Flaherty says. “She had done a lot of TV and film, so she had an idea how to portray a role like this.”

SEE MORE: PHOTOS: Up-and-Coming Young Talent: Variety Youth Impact Report

“The Walking Dead” exec producer Gale Anne Hurd felt similarly confident about working with Riggs, whom she describes as “an actor, not just a child actor,” explaining, “A lot of child actors essentially play versions of themselves, but if they need to go to a deeply emotional place or do something that they themselves in real life wouldn’t do, they have trouble performing those scenes.”

Riggs had a chance to work his way up to the mom-killing scene over the course of three seasons. The young actor and his parents (who are both teachers) were familiar with the graphic novel and always received scripts, so there were never any surprises.

“You know going in that a lot of these characters are going to have a short shelf life,” says Chandler’s father, William. (The pilot featured a zombie girl being shot in the forehead.) “It’s always very sad when we lose a cast member. We just talk our way through it. He has always understood that it’s all pretend, but it’s still difficult because Sarah Wayne Callies was very good to Chandler, and she treated him as a surrogate mom on the set.”

Problems most frequently arise when productions are unclear with parents about what a given role entails, says Children in Film founder Toni Casala. “It’s intimidating for parents (to object) because they’re afraid their kids may never work in this town again. The less experience they’ve had in the industry, the more they’re willing to endure,” says Casala, who points out that productions can make their content as extreme as they like because there’s always some parent willing to sign their kids up for the role. “Child performers don’t really have a say unless their parents make them team players.”

Petersen takes an even more extreme view, citing the thousands of girls who auditioned for Adrian Lyne’s “Lolita” remake, knowing the effect the (less explicit) original had on Sue Lyon: “Remember, children are chattle (under the law). They belong to the parent, no different than a slave. Bad parental choices have consequences.”

For first-time child actors taking small parts, the parents and studio teachers may not have access to the full script. In other cases, masking the full nature of the role is the best way to protect the young performers. That’s how Mexican helmer Amat Escalante — who won director honors at Cannes for “Heli” — staged the film’s shocking torture scene, by clearly explaining to the 11-year-old extra and his parents that the young performer would be instructed to paddle an actor whose backside was exposed, then walk off set with his eyes closed (he would then hear screaming as the tortured actor’s genitals were lit on fire via a computer-generated effect).

“We try to make it a fun atmosphere and to relieve the tension with humor, especially in scenes where we’re doing very difficult things,” says Escalante, who was very protective of the young actors, all of whom were non-pros.

“It’s very different in Mexico because children grow up much quicker. Part of the inspiration of making ‘Heli’ was seeing 12- to 14-year-old children in Guanajuato going through some really difficult things for that age,” says Escalante, who cites the fact that a 6-month-old baby cast elsewhere in the film was accompanied on set by her 14-year-old mother. “It was a minor taking care of a minor.”

Escalante says he was criticized at Cannes for filming the torture, but omitting a scene in which a 12-year-old girl is raped off-camera. The decision was easy: “I can’t fake a young girl being raped, and that would traumatize her for life,” he says.

By contrast, “Blue Is the Warmest Color” director Abdellatif Kechiche followed a waning tradition of casting a young adult (then-18-year-old Exarchopoulos) to play the underage character. American productions have largely gravitated away from that practice, but on “Blue,” Kechiche had no choice. Even so, the film has come under fire since opening in France for its difficult shoot.

Originally scheduled for 2½ months, the pic was extended to five months as Kechiche shadowed the actress everywhere: on the subway, to the club, even into the bathroom to observe her throwing up at one point. He reportedly shot more than 750 hours of Exarchopoulos, and even renamed the character after his young star.

“When Adele sleeps in her bedroom, it’s me who’s really sleeping,” the actress told French magazine Le Nouvel Observateur. And when she and co-star Lea Seydoux play their intimate moments, Kechiche would spend weeks filming a single unsimulated sex scene. “I’m not pretending that at the beginning we didn’t feel uncomfortable. But the fact that Adele discovers this pleasure with a woman for the first time helped me a lot.”

In America, the law forbids minors from such content, but parents are the ultimate judge of whether a project that involves the same thematic material is appropriate for their kids.

On “The Walking Dead,” Hurd and her fellow producers took an extra step of offering counseling services to their young stars: “All of our child actors also have access to a child psychologist, in case they do have any issues,” she says.

If a studio teacher notices something amiss, they have the power to shut down a production until the problem is solved. But the key is to communicate effectively in advance so everybody is on the same page, Casala says. “It’s really important that parents coming into this understand the business and how it can work without injury — or have the guts to say no.”

Elsa Keslassy and Carita Rizzo contributed to this report.

SEE MORE: Variety’s Power of Youth Honorees: